import TcMonad
import TcEnv ( newLocalId )
-import TcMonoType ( tcHsLiftedSigType )
-import TcHsSyn ( TcMonoBinds, TypecheckedForeignDecl,
- TcForeignExportDecl )
+import TcMonoType ( tcHsSigType, UserTypeCtxt(..) )
+import TcHsSyn ( TcMonoBinds, TypecheckedForeignDecl, TcForeignExportDecl )
import TcExpr ( tcPolyExpr )
import Inst ( emptyLIE, LIE, plusLIE )
tcFImport fo@(ForeignImport nm hs_ty imp_decl src_loc)
= tcAddSrcLoc src_loc $
tcAddErrCtxt (foreignDeclCtxt fo) $
- tcHsLiftedSigType hs_ty `thenTc` \ sig_ty ->
+ tcHsSigType (ForSigCtxt nm) hs_ty `thenTc` \ sig_ty ->
let
-- drop the foralls before inspecting the structure
-- of the foreign type.
tcAddSrcLoc src_loc $
tcAddErrCtxt (foreignDeclCtxt fo) $
- tcHsLiftedSigType hs_ty `thenTc` \ sig_ty ->
- tcPolyExpr (HsVar nm) sig_ty `thenTc` \ (rhs, lie, _, _, _) ->
+ tcHsSigType (ForSigCtxt nm) hs_ty `thenTc` \ sig_ty ->
+ tcPolyExpr (HsVar nm) sig_ty `thenTc` \ (rhs, lie, _, _, _) ->
tcCheckFEType sig_ty spec `thenTc_`