Panic (non-exhaustive pattern in compiler)
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' ».
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.0 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |