Generalising the demand analysis to sum types

Joachim Breitner mail at
Wed Feb 17 08:15:27 UTC 2016



Am Dienstag, den 16.02.2016, 23:50 -0500 schrieb José Manuel Calderón Trilla:
> For those with more experience in these matter, does this seem to be
> a sensible approach?

not sure if I qualify, but I have two questions nevertheless. 

You write "fromMaybe2", but (besides the order of the argument) it is
the same as the library "fromMaybe". Is the order of the arguments

And more importatly: Can you outline what you want to do with the
result of the analysis? A worker-wrapper transformation of "fromMaybe"
with a worker that takes an unboxed sum type? If so, what would be the
unboxed sum type be here?

(With products it is easier, because you can just pass the components
as arguments, or use unboxed tuples. But here you would need more
complicated unboxed types.)

BTW, what is the status of ?


Joachim “nomeata” Breitner
  mail at joachim-breitner.de
  XMPP: nomeata at • OpenPGP-Key: 0xF0FBF51F
  Debian Developer: nomeata at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ghc-devs mailing list