Generalising the demand analysis to sum types

Joachim Breitner mail at joachim-breitner.de
Wed Feb 17 08:15:27 UTC 2016


Hi,

interesting!

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
relevant?

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
https://ghc.haskell.org/trac/ghc/wiki/UnpackedSumTypes ?

Greetings,
Joachim


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

-------------- 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: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160217/59c417df/attachment.sig>


More information about the ghc-devs mailing list