Unlifted data types

Roman Cheplyaka roma at ro-che.info
Fri Sep 4 21:41:38 UTC 2015


On 05/09/15 00:23, Edward Z. Yang wrote:
> I would certainly agree that in terms of the data that is representable,
> there is not much difference; but there is a lot of difference for the
> client between Force and a strict field. If I write:
> 
>     let x = undefined
>         y = Strict x
>     in True
> 
> No error occurs with:
> 
>     data Strict = Strict !a
> 
> But an error occurs with:
> 
>     data Strict = Strict (Force a)

At what point does the error occur here? When evaluating True?

What about the following two expressions?

    const False
      (let x = undefined
           y = Strict x
      in True)

    let x = undefined
        y = const False (Strict x)
    in True

Roman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150905/401b1964/attachment.sig>


More information about the ghc-devs mailing list