+ = do { maybe_tc_result <- typecheck dflags pcs hst unqual $
+ tcModule pcs hst get_fixity this_mod decls
+ ; printTcDump dflags maybe_tc_result
+ ; return maybe_tc_result }
+ where
+ fixity_env = mi_fixities mod_iface
+
+ get_fixity :: Name -> Maybe Fixity
+ get_fixity nm = lookupNameEnv fixity_env nm
+
+---------------
+typecheckExpr :: DynFlags
+ -> PersistentCompilerState
+ -> HomeSymbolTable
+ -> PrintUnqualified -- For error printing
+ -> RenamedHsExpr
+ -> IO (Maybe TypecheckedHsExpr)
+
+typecheckExpr dflags pcs hst unqual expr
+ = typecheck dflags pcs hst unqual $
+ newTyVarTy openTypeKind `thenTc` \ ty ->
+ tcMonoExpr expr ty `thenTc` \ (expr', lie) ->
+ tcSimplifyTop lie `thenTc` \ binds ->
+ returnTc (mkHsLet binds expr')
+
+---------------
+typecheck :: DynFlags
+ -> PersistentCompilerState
+ -> HomeSymbolTable
+ -> PrintUnqualified -- For error printing
+ -> TcM r
+ -> IO (Maybe r)
+
+typecheck dflags pcs hst unqual thing_inside