Opened 9 years ago

Closed 9 years ago

Last modified 44 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: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

ghc-6.4: panic! (the `impossible' happened, GHC version
6.4):
        types/Type.lhs:(1107,0)-(1108,77):
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.

thanks,
peter, peteg at unsw.edu.au

Change History (3)

comment:1 Changed 9 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.

thanks,
peter

comment:2 Changed 9 years ago by simonpj

Logged In: YES 
user_id=50165

Duplicate of #1202062, fixed in May.

Simon

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 9 years ago by simonpj

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