My brain just exploded
What a great error message: qcgadt.hs:115:7: My brain just exploded. I can't handle pattern bindings for existentially-quantified constructors. In the binding group (Rep x) = uncompressRep s In the definition of `uncompressRep': uncompressRep (0 : 1 : 0 : s) = let (Rep x) = uncompressRep s in Rep (RList x) Failed, modules loaded: none. Here's the offending line: uncompressRep (0:1:1:s) = let (Rep x) = uncompressRep s in Rep (RList x) But this works: uncompressRep (0:1:0:s) = let x = uncompressRep s in case x of (Rep y) -> Rep (RList y) Can someone explain this? Thanks, Dominic.
Hi :) I have recently raised the same question under the following headline: [Haskell-cafe] Re: Existentially-quantified constructors: Hugs is fine, GHC is not? There are some replies already, but I still do not think such a dual behaviour of pattern matching in case/let/where is fine :) -- Otakar Smrz
participants (2)
-
Dominic Steinitz -
Otakar Smrz