summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcForeign.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/typecheck/TcForeign.lhs')
-rw-r--r--compiler/typecheck/TcForeign.lhs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs
index 9914f94c5f..d755132696 100644
--- a/compiler/typecheck/TcForeign.lhs
+++ b/compiler/typecheck/TcForeign.lhs
@@ -481,6 +481,11 @@ checkCConv StdCallConv = do dflags <- getDynFlags
return CCallConv
checkCConv PrimCallConv = do addErrTc (text "The `prim' calling convention can only be used with `foreign import'")
return PrimCallConv
+checkCConv JavaScriptCallConv = do dflags <- getDynFlags
+ if platformArch (targetPlatform dflags) == ArchJavaScript
+ then return JavaScriptCallConv
+ else do addErrTc (text "The `javascript' calling convention is unsupported on this platform")
+ return JavaScriptCallConv
\end{code}
Warnings