logo       

[ ghc-Bugs-772251 ] Panic (non-exhaustive pattern in compiler): msg#00039

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-772251 ] Panic (non-exhaustive pattern in compiler)

Bugs item #772251, was opened at 2003-07-16 14:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=772251&group_id=8032

Category: Compiler
Group: 6.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Emmanuel Beffara (xbiff)
Assigned to: Nobody/Anonymous (nobody)
Summary: Panic (non-exhaustive pattern in compiler)

Initial Comment:
The following module strangely fails to compile with
GHC 6.0 (it works with GHC 5.02.2, I did not try any
other version).

----
module Bug where
pair t = (t, t)
a = (pair 'x', undefined)
b = a
----

ghc-6.0: panic! (the `impossible' happened, GHC version
6.0):
coreSyn/CoreUtils.lhs:1188: Non-exhaustive patterns in
function isCrossDllArg

The error also happens when 'x' is replaced by a
non-empty list or string, and when it is replaced by a
numeral constant with an explicit type. Compilation
works when 'x' is replaced by an integer with no type
specification, or by a type contructor with no literal
in it (i.e. [] or Nothing). It also works when the
declaration « b = a » is removed, or when « pair 'x' »
is replaced by « ('x', 'x') », or when « (pair 'x',
undefined) » is replaced by « pair 'x' ».

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=772251&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise