White space only
[ghc-hetmet.git] / compiler / coreSyn / MkCore.lhs
index b930f88..acb189f 100644 (file)
@@ -7,8 +7,9 @@ module MkCore (
         mkCoreLams,
         
         -- * Constructing boxed literals
-        mkWordExpr,
-        mkIntExpr, mkIntegerExpr,
+        mkWordExpr, mkWordExprWord,
+        mkIntExpr, mkIntExprInt,
+        mkIntegerExpr,
         mkFloatExpr, mkDoubleExpr,
         mkCharExpr, mkStringExpr, mkStringExprFS,
         
@@ -125,7 +126,7 @@ mk_val_app (Var f `App` Type ty1 `App` Type _ `App` arg1) arg2 _ res_ty
   where
     case_bndr = case arg1 of
                    Var v1 | isLocalId v1 -> v1        -- Note [Desugaring seq (2) and (3)]
-                   _                            -> mkWildId ty1
+                   _                     -> mkWildId ty1
 
 mk_val_app fun arg arg_ty _        -- See Note [CoreSyn let/app invariant]
   | not (needsCaseBinding arg_ty arg)
@@ -134,7 +135,7 @@ mk_val_app fun arg arg_ty _        -- See Note [CoreSyn let/app invariant]
 mk_val_app fun arg arg_ty res_ty
   = Case arg (mkWildId arg_ty) res_ty [(DEFAULT,[],App fun (Var arg_id))]
   where
-    arg_id = mkWildId arg_ty        -- Lots of shadowing, but it doesn't matter,
+    arg_id = mkWildId arg_ty    -- Lots of shadowing, but it doesn't matter,
                                 -- because 'fun ' should not have a free wild-id
 \end{code}
 
@@ -216,12 +217,20 @@ mkCoreLams = mkLams
 
 \begin{code}
 -- | Create a 'CoreExpr' which will evaluate to the given @Int@
-mkIntExpr      :: Int        -> CoreExpr            -- Result = I# i :: Int
-mkIntExpr  i = mkConApp intDataCon  [mkIntLitInt i]
+mkIntExpr      :: Integer    -> CoreExpr            -- Result = I# i :: Int
+mkIntExpr  i = mkConApp intDataCon  [mkIntLit i]
+
+-- | Create a 'CoreExpr' which will evaluate to the given @Int@
+mkIntExprInt   :: Int        -> CoreExpr            -- Result = I# i :: Int
+mkIntExprInt  i = mkConApp intDataCon  [mkIntLitInt i]
+
+-- | Create a 'CoreExpr' which will evaluate to the a @Word@ with the given value
+mkWordExpr     :: Integer    -> CoreExpr
+mkWordExpr w = mkConApp wordDataCon [mkWordLit w]
 
 -- | Create a 'CoreExpr' which will evaluate to the given @Word@
-mkWordExpr     :: Word       -> CoreExpr
-mkWordExpr w = mkConApp wordDataCon [mkWordLitWord w]
+mkWordExprWord :: Word       -> CoreExpr
+mkWordExprWord w = mkConApp wordDataCon [mkWordLitWord w]
 
 -- | Create a 'CoreExpr' which will evaluate to the given @Integer@
 mkIntegerExpr  :: MonadThings m => Integer    -> m CoreExpr  -- Result :: Integer