26 Mar
2004
26 Mar
'04
12:43 p.m.
Hello, probably a trivial question: Is there a type in Haskell that contains only the undefined value _|_? The polymorphic type (forall a. a) has this property, but it seems it cannot be used, e.g., in a tuple:
x :: (Int,(forall a. a)) x = (3,undefined)
leads to errors both in Hugs and GHC. I guess I can help myself out using newtype:
newtype T = T (forall a. a)
x :: (Int,T) x = (3,undefined)
but would like to do without. Is there a way? Thanks, Janis. -- Janis Voigtlaender http://wwwtcs.inf.tu-dresden.de/~voigt/ mailto:voigt@tcs.inf.tu-dresden.de