Skip to content

ghc panic during parsing

For the following piece of code

class Bla (forall x . x) where

the ghc parser yields the appropriate error

Forall type not allowed as type parameter

However, if you change the code to this

class Bla (forall x . x :: *) where

Then ghc does this:

ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.1 for i386-apple-darwin):
	parser/RdrHsSyn.lhs:(525,4)-(548,64): Non-exhaustive patterns in function collect

This is reproducible on ghc-6.8.3 and ghc-6.10.1.

I have only tried it on Mac OS X, x86.

Trac metadata
Trac field Value
Version 6.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information