[Haskell-cafe] Support of multi-constructor types by UNPACK pragma
Nikita Volkov
nikita.y.volkov at mail.ru
Sun Jun 15 11:43:53 UTC 2014
Currently the pragma only supports single-constructor types. So in the
following example it will simply be ignored:
data A =
A1 Char |
A2 {-# UNPACK #-} !B
data B =
B1 Int |
B2 Bool
However it seems to be easily solvable by changing the type A to something
like the following during unpacking:
data A =
A1 Char |
A2_1 Int | -- from B1
A2_2 Bool -- from B2
Am I missing something? Why is it not implemented?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140615/375d692d/attachment.html>
More information about the Haskell-Cafe
mailing list