[project @ 1997-12-02 18:52:08 by quintela]
[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(..), DsMatchKind(..) )
9 import DsBinds  ( dsBinds )
10 import DsExpr   ( dsExpr )
11 import DsUtils  ( EquationInfo, MatchResult )
12 import FastString ( FastString )
13 import Id       ( Id(..) )
14 import Match    ( matchExport, 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       -> DsM MatchResult  -- Desugared result!
21 matchExport :: [Id]     -- Variables rep'ing     the exprs we're matching with
22       -> [EquationInfo]   -- Info about patterns, etc. (type synonym below)
23       -> DsM MatchResult  -- Desugared result!
24
25 matchSimply :: CoreExpr                 -- Scrutinee
26             -> DsMatchKind              -- Type of Match
27             -> TypecheckedPat           -- Pattern it should match
28             -> Type                     -- Type of result
29             -> CoreExpr                 -- Return this if it matches
30             -> CoreExpr                 -- Return this if it does
31             -> DsM CoreExpr
32
33 dsBinds :: Bool -> TypecheckedHsBinds -> DsM [CoreBinding]
34 dsExpr  :: TypecheckedHsExpr  -> DsM CoreExpr
35 \end{code}