Opened 10 years ago

Closed 10 years ago

Last modified 46 years ago

#411 closed bug (Fixed)

panic: "Non-exhaustive patterns in function zip_ty_env"

Reported by: nobody Owned by: simonpj
Priority: normal Milestone:
Component: Compiler (Type checker) Version: None
Keywords: Cc:
Operating System: Architecture:
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


ghc-6.4: panic! (the `impossible' happened, GHC version
Non-exhaustive patterns in function zip_ty_env

The same file compiles fine with GHC 6.2.2.

Unfortunately I don't have a small example of this
behaviour. I can send you the whole library if you need
it, but it is not painless to get to this point.

It would be great if you could give me some pointers
about where the bug might lie - it uses MPTC instances,
recursive newtypes and the FFI.

peter, peteg at

Change History (3)

comment:1 Changed 10 years ago by nobody

Logged In: NO 

One more data point: I have a recursive newtype:

newtype P = MkP (ForeignPtr P)

and a couple of renamings:

newtype Q b = MkQ P
newtype R b = MkR P

changing this to:

data Q b = MkQ P
data R b = MkR P

makes things work. I tried cooking up a smaller example
based on this but the bug doesn't appear - it is the
interaction of these newtypes and some other feature, I expect.

Hope this helps.


comment:2 Changed 10 years ago by simonpj

Logged In: YES 

Duplicate of #1202062, fixed in May.


tc193.hs is a small test:

newtype Signal a = Signal Symbol
newtype Symbol = Symbol (S Symbol)
data S s = Bool Bool
liftl :: Signal a -> Symbol
liftl (Signal a) = a 

comment:3 Changed 10 years ago by simonpj

  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.