[Haskell] Haskell type containing no non-_|_ values?

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Fri Mar 26 13:56:04 EST 2004


On Fri, Mar 26, 2004 at 01:43:25PM +0100, Janis Voigtlaender wrote:
> Hello,
> 
> probably a trivial question: Is there a type in Haskell that contains
> only the undefined value _|_?
>
> I guess I can help myself out using newtype:
> 
> > newtype T = T (forall a. a)

This is not Haskell 98.

> but would like to do without. Is there a way?

With newtype and conforming to Haskell 98:
    newtype B = B B

Without newtype but using GHC extenstions:
    data B

I don't know if you can have both 'no newtype' and 'haskell 98'
satisfied.

Best regards,
Tom

-- 
.signature: Too many levels of symbolic links


More information about the Haskell mailing list