strict bits of datatypes

John Meacham john at
Fri Mar 16 14:28:11 EDT 2007

On Fri, Mar 16, 2007 at 05:00:15PM +0000, Jón Fairbairn wrote:
> Does it? Mentally I translate that as 
>    let q = Y (\q -> FinCons 3 q) in q

but it would actually translate to

>    let q = Y (\q -> q `seq` FinCons 3 q) in q

for strict fields, whenever a constructor appears, it is translated to
one which seq's its strict fields before creating the constructor.


FinCons 3 q 
desugars to

q `seq` FinCons 3 q wherever it appears,

strict fields have no effect on deconstructing data types.


John Meacham - ⑆⑆john⑈

More information about the Haskell-prime mailing list