mkCase: null alts wild_Xs{v} [lid] a{v ace2} [lid]
Simon Peyton-Jones
simonpj at microsoft.com
Thu Mar 5 04:31:01 EST 2009
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: glasgow-haskell-bugs-bounces at haskell.org [mailto:glasgow-haskell-bugs-bounces at haskell.org] On Behalf Of Conal Elliott
Sent: 04 March 2009 19:55
To: glasgow-haskell-bugs at haskell.org
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20090305/b48fd345/attachment.htm
More information about the Glasgow-haskell-bugs
mailing list