Forall quantified record fields.

Ulf Norell ulfn@cs.chalmers.se
Mon, 29 Jul 2002 11:42:48 +0200 (MEST)


Hugs will produce funny looking results when using forall quantified
fields in records. For instance

newtype Foo = Foo { foo :: forall a. a -> a }

Main> foo (Foo {foo = id}) 42
Foo_Foo id 42
Main> $$ + 1

INTERNAL ERROR: Bignum expected
Main> foo (Foo {foo = id}) 42 + (1 :: Int)
1
Main> foo (Foo {foo = id}) True

Program error: {instShow_v81_v1123 0 (Foo_Foo id Bool_True)}

Everything works fine though, if you don't use the record update syntax:

Main> foo (Foo id) True
True

/ Ulf Norell