-{-# 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
-
module VectCore (
Vect, VVar, VExpr, VBind,
vVar, vType, vNote, vLet,
vLams, vLamsWithoutLC, vVarApps,
- vCaseDEFAULT, vCaseProd
+ vCaseDEFAULT, vCaseProd, vInlineMe
) where
#include "HsVersions.h"
import CoreSyn
+import CoreUtils ( mkInlineMe )
+import MkCore ( mkWildCase )
import CoreUtils ( exprType )
import DataCon ( DataCon )
import Type ( Type )
-import Id ( mkWildId )
import Var
type Vect a = (a,a)
-> DataCon -> DataCon -> [Var] -> [VVar] -> VExpr -> VExpr
vCaseProd (vscrut, lscrut) vty lty vdc ldc sh_bndrs bndrs
(vbody,lbody)
- = (Case vscrut (mkWildId $ exprType vscrut) vty
+ = (mkWildCase vscrut (exprType vscrut) vty
[(DataAlt vdc, vbndrs, vbody)],
- Case lscrut (mkWildId $ exprType lscrut) lty
+ mkWildCase lscrut (exprType lscrut) lty
[(DataAlt ldc, sh_bndrs ++ lbndrs, lbody)])
where
(vbndrs, lbndrs) = unzip bndrs
+
+vInlineMe :: VExpr -> VExpr
+vInlineMe (vexpr, lexpr) = (mkInlineMe vexpr, mkInlineMe lexpr)
+