Proposals and owners

Isaac Dupree ml at isaac.cedarswampstudios.org
Sat Aug 8 13:16:59 EDT 2009


Ross Paterson wrote:
> On Sat, Aug 08, 2009 at 10:09:38AM +0100, Iavor Diatchki wrote:
>> I thought that the intended semantics was supposed to be that the only
>> element is bottom (hence the proposal to add a related empty case
>> construct)?
> 
> If that were the case, a compiler could legitimately discard any value
> of such a type, because it could be easily reconstructed.  I don't
> think that is what is intended.

Actually, I think it is.  I think that's a natural consequence of the 
way Haskell is specified.  GHC tries to pick the kind of bottom that you 
expected, but it doesn't always work really well, because it's not 
actually specified in any sort of formal way...

Now, with imprecise exceptions, I'm not sure a compiler could 
legitimately discard the value.

(by the way, for a type that you can unsafeCoerce anything to, GHC has a 
special type named "Any". Which is not the same as a data type with no 
constructors.)

-Isaac


More information about the Haskell-prime mailing list