blob: 26a0c4b31347f41b4fd529bd4a6a50f30e96a580 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
Break the loop between Match and DsUtils and the loops
between DsExpr/DsBinds and various things.
\begin{code}
interface DsLoop where
import CoreSyn ( CoreBinding(..), CoreExpr(..) )
import DsMonad ( DsM(..) )
import DsBinds ( dsBinds )
import DsExpr ( dsExpr )
import DsUtils ( EquationInfo, MatchResult )
import Id ( Id(..) )
import Match ( match, matchSimply )
import TcHsSyn ( TypecheckedHsBinds(..), TypecheckedHsExpr(..), TypecheckedPat(..) )
import Type ( Type(..) )
match :: [Id] -- Variables rep'ing the exprs we're matching with
-> [EquationInfo] -- Info about patterns, etc. (type synonym below)
-> [EquationInfo] -- Potentially shadowing equations above this one
-> DsM MatchResult -- Desugared result!
matchSimply :: CoreExpr -- Scrutinee
-> TypecheckedPat -- Pattern it should match
-> Type -- Type of result
-> CoreExpr -- Return this if it matches
-> CoreExpr -- Return this if it does
-> DsM CoreExpr
dsBinds :: TypecheckedHsBinds -> DsM [CoreBinding]
dsExpr :: TypecheckedHsExpr -> DsM CoreExpr
\end{code}
|