Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix warnings in prelude/ForeignCall.lhs

  • Loading branch information...
commit 48a5c1e2481fc814c19ca73d4c5e78ba9962e5c4 1 parent 1a97815
@igfoo igfoo authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 compiler/prelude/ForeignCall.lhs
View
10 compiler/prelude/ForeignCall.lhs
@@ -4,12 +4,6 @@
\section[Foreign]{Foreign calls}
\begin{code}
-{-# OPTIONS -w #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and fix
--- any warnings in the module. See
--- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
--- for details
{-# LANGUAGE DeriveDataTypeable #-}
module ForeignCall (
@@ -173,6 +167,8 @@ defaultCCallConv = CCallConv
ccallConvToInt :: CCallConv -> Int
ccallConvToInt StdCallConv = 0
ccallConvToInt CCallConv = 1
+ccallConvToInt (CmmCallConv {}) = panic "ccallConvToInt CmmCallConv"
+ccallConvToInt (PrimCallConv {}) = panic "ccallConvToInt PrimCallConv"
\end{code}
Generate the gcc attribute corresponding to the given
@@ -182,6 +178,8 @@ calling convention (used by PprAbsC):
ccallConvAttribute :: CCallConv -> String
ccallConvAttribute StdCallConv = "__attribute__((__stdcall__))"
ccallConvAttribute CCallConv = ""
+ccallConvAttribute (CmmCallConv {}) = panic "ccallConvAttribute CmmCallConv"
+ccallConvAttribute (PrimCallConv {}) = panic "ccallConvAttribute PrimCallConv"
\end{code}
\begin{code}
Please sign in to comment.
Something went wrong with that request. Please try again.