import qualified Language.Haskell.TH.THLib as TH
-- THSyntax gives access to internal functions and data types
-import HscTypes ( HscEnv(..) )
import HsSyn ( HsBracket(..), HsExpr(..), HsSplice(..), LHsExpr, LHsDecl,
HsType, LHsType )
import Convert ( convertToHsExpr, convertToHsDecls, convertToHsType )
import TcHsSyn ( mkHsLet, zonkTopLExpr )
import TcSimplify ( tcSimplifyTop, tcSimplifyBracket )
import TcUnify ( Expected, zapExpectedTo, zapExpectedType )
-import TcType ( TcType, TcKind, openTypeKind, mkAppTy, tcSplitSigmaTy )
+import TcType ( TcType, TcKind, liftedTypeKind, mkAppTy, tcSplitSigmaTy )
import TcEnv ( spliceOK, tcMetaTy, bracketOK, tcLookup )
import TcMType ( newTyVarTy, newKindVar, UserTypeCtxt(ExprSigCtxt), zonkTcType, zonkTcTyVar )
import TcHsType ( tcHsSigType, kcHsType )
import Name ( Name, NamedThing(..), nameOccName, nameModule, isExternalName, mkInternalName )
import OccName
import Var ( Id, TyVar, idType )
-import RdrName ( RdrName )
import Module ( moduleUserString, mkModuleName )
import TcRnMonad
import IfaceEnv ( lookupOrig )
import SrcLoc ( noLoc, unLoc, getLoc, noSrcLoc )
import Outputable
import Unique ( Unique, Uniquable(..), getKey, mkUniqueGrimily )
-import IOEnv ( IOEnv )
+
import BasicTypes ( StrictnessMark(..), Fixity(..), FixityDirection(..) )
-import Module ( moduleUserString )
import Panic ( showException )
-import FastString ( LitString, mkFastString )
-import FastTypes ( iBox )
+import FastString ( LitString )
import GHC.Base ( unsafeCoerce#, Int#, Int(..) ) -- Should have a better home in the module hierarchy
import Monad ( liftM )
-- Result type is Var (not Q-monadic)
tc_bracket (ExpBr expr)
- = newTyVarTy openTypeKind `thenM` \ any_ty ->
+ = newTyVarTy liftedTypeKind `thenM` \ any_ty ->
tcCheckRho expr any_ty `thenM_`
tcMetaTy expQTyConName
-- Result type is Expr (= Q Exp)
-- Here (h 4) :: Q Exp
-- but $(h 4) :: forall a.a i.e. anything!
- zapExpectedType res_ty `thenM_`
+ zapExpectedType res_ty liftedTypeKind `thenM_`
tcMetaTy expQTyConName `thenM` \ meta_exp_ty ->
setStage (Splice next_level) (
setLIEVar lie_var $