RE: GHC 4.01: Problems Using Existential Types

1998-12-14 Thread Simon Peyton-Jones
exist.hs:73: My brain just exploded. I can't handle pattern bindings for existentially-quantified constructors. It was my brain. (Though I discussed it with Mark, and I think Hugs may have a similar restriction.) data GenPic = forall pot. (PictureObject pot) = MkGenPic pot main

RE: GHC 4.01: Problems Using Existential Types

1998-12-14 Thread Kevin Glynn
Simon Peyton-Jones writes: data GenPic = forall pot. (PictureObject pot) = MkGenPic pot main :: IO () main = do putStr $ getPictureName obj where MkGenPic obj = item item = head obj_list The problem is the pattern binding for MkGenPic. Try