panic on conflicting patterns in TH splice
The definition
g c c = undefined
gives a nice error message:
Conflicting definitions for
c' In the definition of
g'
.
However, when trying to splice in the analogous function
foo = sequence
[
funD (mkName "f")
[
clause
[varP $ mkName "c",varP $ mkName "c"]
(normalB $ [| undefined |])
[]
]
]
, the compiler panics:
ghc-6.4.2: panic! (the `impossible' happened, GHC version 6.4.2):
SrcLoc.srcSpanStartLine
- It would be nice if ghc gave an error message just like the non-TH case.
Trac metadata
Trac field | Value |
---|---|
Version | 6.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Template Haskell |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |