import CoreSyn
import Literal
import CoreUtils
+import MkCore
import DsMonad
import DsBinds
import DsGRHSs
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).
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!
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[] }
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)