#7276: -fdefer-type-errors allows the types of quotations to be coerced, causing
segmentation fault
---------------------------------+------------------------------------------
Reporter: parcs | Owner:
Type: bug | Status: merge
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Compile-time crash
Difficulty: Unknown | Testcase: th/T7276
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by parcs):
I think I found the underlying issue: when the inferred type and actual
type of a TH bracket don't match, the TH bracket does not get replaced
with a call to `error`. Instead, the bracket is just coerced to whatever
type it's expected to be, e.g.:
{{{
> let a = [| True |] :: Int
> a
1099511628032
}}}
instead of:
{{{
> let a = [| True |] :: Int
> a
*** Exception: <interactive>:2:9:
Couldn't match type `Language.Haskell.TH.Syntax.Q
...
(deferred type error)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7276#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs