14 Apr
2004
14 Apr
'04
3:58 p.m.
data Show' = forall a . Show a => Show' a
The "forall a. Show a =>" context here has no effect on the representation; it merely constrains applications of the data constructor Show'. Since you have to say
print' :: Show' -> IO ()
anyway (thus providing the dictionary) there is no point in storing it. Thus
*DepTest> :t x x :: forall a. a
is indeed the type of x. There was a thread about this in the café recently; see http://www.haskell.org//pipermail/haskell-cafe/2004-March/005985.html http://www.haskell.org//pipermail/haskell-cafe/2004-March/005999.html http://www.haskell.org//pipermail/haskell-cafe/2004-March/005998.html --KW 8-)