9f8759607368e1f9fb38c19fe7570dff2763b007
[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 FastString ( FastString )
13 import Id       ( Id(..) )
14 import Match    ( match, matchSimply )
15 import PreludeStdIO ( Maybe )
16 import TcHsSyn  ( TypecheckedHsBinds(..), TypecheckedHsExpr(..), TypecheckedPat(..) )
17 import Type     ( Type(..) )
18 match :: [Id]             -- Variables rep'ing the exprs we're matching with
19       -> [EquationInfo]   -- Info about patterns, etc. (type synonym below)
20       -> [EquationInfo]   -- Potentially shadowing equations above this one
21       -> DsM MatchResult  -- Desugared result!
22
23 matchSimply :: CoreExpr                 -- Scrutinee
24             -> TypecheckedPat           -- Pattern it should match
25             -> Type                     -- Type of result
26             -> CoreExpr                 -- Return this if it matches
27             -> CoreExpr                 -- Return this if it does
28             -> DsM CoreExpr
29
30 dsBinds :: Maybe (FastString, FastString) -> TypecheckedHsBinds -> DsM [CoreBinding]
31 dsExpr  :: TypecheckedHsExpr  -> DsM CoreExpr
32 \end{code}