It's a bit unusual, but it shows up in a situation like this

data T a where
   T1 :: T Int
   T2 :: T Bool

x :: T Char
...case x of { ... }....

In this case no patterns can match, so the entire case should be unreachable.   
In this situation the entire case is replaced by (error "Impossible 
alternative").   (Should really say "Unreachable case expression".)

It's quite difficult to make this happen without the enclosing code also being 
unreachable and discarded, which is why I flagged it.   You could do some 
-dverbose-core2core stuff to see it happening if you liked, but no, it should 
not be harmful.

Simon



From: [email protected] 
[mailto:[email protected]] On Behalf Of Conal Elliott
Sent: 04 March 2009 19:55
To: [email protected]
Subject: mkCase: null alts wild_Xs{v} [lid] a{v ace2} [lid]

I'm getting this message from ghc 6.11.20090115:

    mkCase: null alts wild_Xs{v} [lid] a{v ace2} [lid]

My code compiles and seems to run okay.  Is it anything to worry about?
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to