Breaking the staging restriction in type splices causes GHC panic
Test case:
{-# LANGUAGE TemplateHaskell #-}
module B where
import Language.Haskell.TH
ty :: Q Type
ty = [t| Int |]
f :: $ty
f = undefined
The error message is:
B.hs:9:6:
GHC internal error: `ty' is not in scope during type checking, but it passed the renamer
tcl_env of environment: []
In the expression: ty
In the type signature for `f': f :: $ty
This is the same error as in #5792 (closed).
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.1-rc1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Template Haskell |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |