diff options
| author | Ian Lynagh <igloo@earth.li> | 2008-03-29 14:39:14 +0000 |
|---|---|---|
| committer | Ian Lynagh <igloo@earth.li> | 2008-03-29 14:39:14 +0000 |
| commit | 9448411acfcaae8109c31be5828e75619f2cad9b (patch) | |
| tree | 63ee20f4fd5fcecd00b47ef0a037b77f800843b1 /compiler | |
| parent | 493d09b47e4d4faec4f0696d071e3b7f4e7b84ea (diff) | |
| download | haskell-9448411acfcaae8109c31be5828e75619f2cad9b.tar.gz | |
prelude/PrimOp is now mostly warning-free
commutableOp seems to be unused, so we're no 100% there yet.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/prelude/PrimOp.lhs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/prelude/PrimOp.lhs b/compiler/prelude/PrimOp.lhs index a98e3a05f7..7c30d9eb64 100644 --- a/compiler/prelude/PrimOp.lhs +++ b/compiler/prelude/PrimOp.lhs @@ -4,7 +4,7 @@ \section[PrimOp]{Primitive operations (machine-level)} \begin{code} -{-# OPTIONS -w #-} +{-# OPTIONS -fno-warn-unused-binds #-} -- 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 @@ -39,6 +39,7 @@ import BasicTypes ( Arity, Boxity(..) ) import Unique ( Unique, mkPrimOpIdUnique ) import Outputable import FastTypes +import FastString \end{code} %************************************************************************ @@ -130,9 +131,12 @@ data PrimOpInfo [Type] Type +mkDyadic, mkMonadic, mkCompare :: FastString -> Type -> PrimOpInfo mkDyadic str ty = Dyadic (mkVarOccFS str) ty mkMonadic str ty = Monadic (mkVarOccFS str) ty mkCompare str ty = Compare (mkVarOccFS str) ty + +mkGenPrimOp :: FastString -> [TyVar] -> [Type] -> Type -> PrimOpInfo mkGenPrimOp str tvs tys ty = GenPrimOp (mkVarOccFS str) tvs tys ty \end{code} @@ -464,6 +468,7 @@ commutableOp :: PrimOp -> Bool Utils: \begin{code} +dyadic_fun_ty, monadic_fun_ty, compare_fun_ty :: Type -> Type dyadic_fun_ty ty = mkFunTys [ty, ty] ty monadic_fun_ty ty = mkFunTy ty ty compare_fun_ty ty = mkFunTys [ty, ty] boolTy |
