Hi,

after playing a bit with the Demand analyser and trying debug tricky
bugs (#8569), I begin to wonder: Can cardinality analysis subsume
strictness analysis?

Not directly, obviously, but if we change

data Count = One | Many
to
data Count = AtMostOne | ExactlyOne | AtLeastOne | Many
(or some other form that would allow us to express all possible
intervals in {0,1,∞}), would the demand and cardinality analysis then
not subsume strictness, given that:
        A value is used strictly if is definitely used at least once?

That might simplify the Demand.lhs code, and also the demand signatures,
quite a bit, because currently it carries strictness and demand data
around separately, duplicating lots of stuff.

Greetings,
Joachim


-- 
Joachim “nomeata” Breitner
  [email protected]http://www.joachim-breitner.de/
  Jabber: [email protected]  • GPG-Key: 0x4743206C
  Debian Developer: [email protected]

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to