import HsSyn ( HsBracket(..), HsExpr(..), HsSplice(..), LHsExpr, LHsDecl,
HsType, LHsType )
-import LoadIface ( loadHomeInterface )
import Convert ( convertToHsExpr, convertToHsDecls, convertToHsType, thRdrName )
import RnExpr ( rnLExpr )
import RnEnv ( lookupFixityRn, lookupSrcOcc_maybe, lookupImportedName )
tc_bracket :: HsBracket Name -> TcM TcType
tc_bracket (VarBr v)
- = do { loadHomeInterface msg v -- Reason: deprecation checking asumes the
- -- home interface is loaded, and this is the
- -- only way that is going to happen
- ; tcMetaTy nameTyConName -- Result type is Var (not Q-monadic)
- }
- where
- msg = ptext SLIT("Need interface for Template Haskell quoted Name")
+ = tcMetaTy nameTyConName -- Result type is Var (not Q-monadic)
tc_bracket (ExpBr expr)
= newTyFlexiVarTy liftedTypeKind `thenM` \ any_ty ->
-- Result type is Type (= Q Typ)
tc_bracket (DecBr decls)
- = tcTopSrcDecls emptyModDetails decls `thenM_`
+ = do { tcTopSrcDecls emptyModDetails decls
-- Typecheck the declarations, dicarding the result
-- We'll get all that stuff later, when we splice it in
- tcMetaTy decTyConName `thenM` \ decl_ty ->
- tcMetaTy qTyConName `thenM` \ q_ty ->
- returnM (mkAppTy q_ty (mkListTy decl_ty))
+ ; decl_ty <- tcMetaTy decTyConName
+ ; q_ty <- tcMetaTy qTyConName
+ ; return (mkAppTy q_ty (mkListTy decl_ty))
-- Result type is Q [Dec]
+ }
\end{code}