3 ------- Forwarded Message
5 Date: Wed, 30 Nov 1994 16:34:18 +0100
6 From: John Hughes <rjmh@cs.chalmers.se>
7 To: augustss@cs.chalmers.se, simonpj@dcs.gla.ac.uk
8 Subject: Nice little program
13 You might like to look at the fun little program below.
15 THUMBS DOWN to hbc for compiling it (it prints [72, 101, 108, 108, 111])
16 THUMBS UP to ghc for rejecting it --- but what an error message!
17 nhc and gofer both reject it with the right error message.
18 I haven't tried Yale Haskell.
21 - ----------------------------
28 instance HasX (X x) where
31 changetype x = case setX x (X (error "change type!")) of X y->y
33 main = print (changetype "Hello" :: [Int])
36 ------- End of Forwarded Message