Unlifted data types

Simon Peyton Jones simonpj at microsoft.com
Tue Sep 8 14:58:23 UTC 2015


|  > data unlifted UBool = UTrue | UFalse
|  >
|  > Intuitively, if you have x :: UBool in scope, you are guaranteed to
|  > have UTrue or UFalse, and not bottom.
|  
|  But I still can say:
|  
|  foo :: UBool
|  foo = foo
|  
|  and now foo contains bottom.

You definitely CANNOT have a top-level declaration for a value of an unlifted type, any more than you can have for an Int# or unboxed tuple today.  That should resolve your question.

Simon



More information about the ghc-devs mailing list