[commit: ghc] master: Remove checkCOrAsmOrLlvmOrDotNetOrInterp (f3d3bae)
Ian Lynagh
igloo at earth.li
Fri Jan 11 21:51:36 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/f3d3baec3c178089324cf279240dc538cbb2f632
>---------------------------------------------------------------
commit f3d3baec3c178089324cf279240dc538cbb2f632
Author: Ian Lynagh <ian at well-typed.com>
Date: Fri Jan 11 16:57:32 2013 +0000
Remove checkCOrAsmOrLlvmOrDotNetOrInterp
We now just use checkCOrAsmOrLlvmOrInterp instead, which had
an identical definition.
>---------------------------------------------------------------
compiler/typecheck/TcForeign.lhs | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs
index 0d86e64..b1aef2f 100644
--- a/compiler/typecheck/TcForeign.lhs
+++ b/compiler/typecheck/TcForeign.lhs
@@ -255,7 +255,7 @@ tcCheckFIType sig_ty arg_tys res_ty idecl@(CImport cconv safety mh (CFunction ta
dflags <- getDynFlags
check (xopt Opt_GHCForeignImportPrim dflags)
(text "Use -XGHCForeignImportPrim to allow `foreign import prim'.")
- checkCg (checkCOrAsmOrLlvmOrDotNetOrInterp)
+ checkCg checkCOrAsmOrLlvmOrInterp
checkCTarget target
check (playSafe safety)
(text "The safe/unsafe annotation should not be used with `foreign import prim'.")
@@ -264,7 +264,7 @@ tcCheckFIType sig_ty arg_tys res_ty idecl@(CImport cconv safety mh (CFunction ta
checkForeignRes nonIOok checkSafe (isFFIPrimResultTy dflags) res_ty
return idecl
| otherwise = do -- Normal foreign import
- checkCg checkCOrAsmOrLlvmOrDotNetOrInterp
+ checkCg checkCOrAsmOrLlvmOrInterp
cconv' <- checkCConv cconv
checkCTarget target
dflags <- getDynFlags
@@ -283,7 +283,7 @@ tcCheckFIType sig_ty arg_tys res_ty idecl@(CImport cconv safety mh (CFunction ta
-- that the C identifier is valid for C
checkCTarget :: CCallTarget -> TcM ()
checkCTarget (StaticTarget str _ _) = do
- checkCg checkCOrAsmOrLlvmOrDotNetOrInterp
+ checkCg checkCOrAsmOrLlvmOrInterp
check (isCLabelString str) (badCName str)
checkCTarget DynamicTarget = panic "checkCTarget DynamicTarget"
@@ -437,14 +437,6 @@ checkCOrAsmOrLlvmOrInterp HscInterpreted = Nothing
checkCOrAsmOrLlvmOrInterp _
= Just (text "requires interpreted, unregisterised, llvm or native code generation")
-checkCOrAsmOrLlvmOrDotNetOrInterp :: HscTarget -> Maybe SDoc
-checkCOrAsmOrLlvmOrDotNetOrInterp HscC = Nothing
-checkCOrAsmOrLlvmOrDotNetOrInterp HscAsm = Nothing
-checkCOrAsmOrLlvmOrDotNetOrInterp HscLlvm = Nothing
-checkCOrAsmOrLlvmOrDotNetOrInterp HscInterpreted = Nothing
-checkCOrAsmOrLlvmOrDotNetOrInterp _
- = Just (text "requires interpreted, unregisterised, llvm or native code generation")
-
checkCg :: (HscTarget -> Maybe SDoc) -> TcM ()
checkCg check = do
dflags <- getDynFlags
More information about the ghc-commits
mailing list