Make some profiling flags dynamic
[ghc-hetmet.git] / compiler / deSugar / Match.lhs
index f545930..a28eb84 100644 (file)
@@ -26,6 +26,7 @@ import Check
 import CoreSyn
 import Literal
 import CoreUtils
+import MkCore
 import DsMonad
 import DsBinds
 import DsGRHSs
@@ -242,7 +243,7 @@ Make all constructor patterns in column~1 into @ConPats@, notably
 Handle any irrefutable (or ``twiddle'') @LazyPats@.
 \end{itemize}
 \item
-Now {\em unmix} the equations into {\em blocks} [w/ local function
+Now {\em unmix} the equations into {\em blocks} [w\/ local function
 @unmix_eqns@], in which the equations in a block all have variable
 patterns in column~1, or they all have constructor patterns in ...
 (see ``the mixture rule'' in SLPJ).
@@ -268,7 +269,7 @@ Wadler-chapter @match@ (p.~93, last clause), and @match_unmixed_blk@
 corresponds roughly to @matchVarCon@.
 
 \begin{code}
-match :: [Id]            -- Variables rep'ing the exprs we're matching with
+match :: [Id]            -- Variables rep\'ing the exprs we\'re matching with
       -> Type             -- Type of the case expression
       -> [EquationInfo]          -- Info about patterns, etc. (type synonym below)
       -> DsM MatchResult  -- Desugared result!
@@ -462,7 +463,7 @@ tidy1 v (VarPat var)
 
 tidy1 v (VarPatOut var binds)
   = do { prs <- dsLHsBinds binds
-       ; return (wrapBind var v . mkDsLet (Rec prs),
+       ; return (wrapBind var v . mkCoreLet (Rec prs),
                  WildPat (idType var)) }
 
        -- case v of { x@p -> mr[] }
@@ -485,7 +486,7 @@ tidy1 v (AsPat (L _ var) pat)
 tidy1 v (LazyPat pat)
   = do { sel_prs <- mkSelectorBinds pat (Var v)
        ; let sel_binds =  [NonRec b rhs | (b,rhs) <- sel_prs]
-       ; return (mkDsLets sel_binds, WildPat (idType v)) }
+       ; return (mkCoreLets sel_binds, WildPat (idType v)) }
 
 tidy1 _ (ListPat pats ty)
   = return (idDsWrapper, unLoc list_ConPat)