Forall quantified record fields.

Ulf Norell <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.