Unlifted data types
Roman Cheplyaka
roma at ro-che.info
Fri Sep 4 21:43:19 UTC 2015
On 05/09/15 00:41, Roman Cheplyaka wrote:
> 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
On second though, the second one shouldn't even compile because of the
kind error, right?
-------------- 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/f1e77705/attachment.sig>
More information about the ghc-devs
mailing list