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