summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9af77fa)
Ooops... forgot these droppings, sorry
import CmdLineOpts ( DynFlag(..), dopt, opt_SccProfilingOn )
import HscTypes ( ModGuts(..), ModGuts, HscEnv(..), ExternalPackageState(..),
PersistentCompilerState(..),
import CmdLineOpts ( DynFlag(..), dopt, opt_SccProfilingOn )
import HscTypes ( ModGuts(..), ModGuts, HscEnv(..), ExternalPackageState(..),
PersistentCompilerState(..),
+ lookupType, unQualInScope )
import HsSyn ( MonoBinds, RuleDecl(..), RuleBndr(..),
HsExpr(..), HsBinds(..), MonoBinds(..) )
import TcHsSyn ( TypecheckedRuleDecl, TypecheckedHsExpr )
import HsSyn ( MonoBinds, RuleDecl(..), RuleBndr(..),
HsExpr(..), HsBinds(..), MonoBinds(..) )
import TcHsSyn ( TypecheckedRuleDecl, TypecheckedHsExpr )
import NameEnv ( lookupNameEnv )
import VarEnv
import VarSet
import NameEnv ( lookupNameEnv )
import VarEnv
import VarSet
-import Bag ( isEmptyBag )
+import Bag ( isEmptyBag, mapBag )
import CoreLint ( showPass, endPass )
import ErrUtils ( doIfSet, dumpIfSet_dyn, pprBagOfWarnings, addShortWarnLocLine )
import Outputable
import CoreLint ( showPass, endPass )
import ErrUtils ( doIfSet, dumpIfSet_dyn, pprBagOfWarnings, addShortWarnLocLine )
import Outputable
import UniqSupply ( mkSplitUniqSupply )
import UniqSupply ( mkSplitUniqSupply )
+import SrcLoc ( SrcLoc )
import FastString
import DATA_IOREF ( readIORef )
\end{code}
import FastString
import DATA_IOREF ( readIORef )
\end{code}
= initDs dflags us lookup mod
(dsProgram binds rules fords)
= initDs dflags us lookup mod
(dsProgram binds rules fords)
- warn_doc = pprBagOfWarnings (mapBag mk_warn ds_warns))
+ warn_doc = pprBagOfWarnings (mapBag mk_warn ds_warns)
-- Display any warnings
; doIfSet (not (isEmptyBag ds_warns))
-- Display any warnings
; doIfSet (not (isEmptyBag ds_warns))
-- Desugarer warnings are SDocs; here we
-- add the info about whether or not to print unqualified
-- Desugarer warnings are SDocs; here we
-- add the info about whether or not to print unqualified
- mk_warn (loc,sdoc) = (loc, addShortWarnLocLine loc print_unqual sdoc)
+ mk_warn :: (SrcLoc,SDoc) -> (SrcLoc, Pretty.Doc)
+ mk_warn (loc, sdoc) = addShortWarnLocLine loc print_unqual sdoc
-- The lookup function passed to initDs is used for well-known Ids,
-- such as fold, build, cons etc, so the chances are
-- The lookup function passed to initDs is used for well-known Ids,
-- such as fold, build, cons etc, so the chances are
-- Do desugaring
; let (core_expr, ds_warns) = initDs dflags us lookup mod_name (dsExpr tc_expr)
-- Do desugaring
; let (core_expr, ds_warns) = initDs dflags us lookup mod_name (dsExpr tc_expr)
+ warn_doc = pprBagOfWarnings (mapBag mk_warn ds_warns)
+ mk_warn :: (SrcLoc,SDoc) -> (SrcLoc, Pretty.Doc)
+ mk_warn (loc,sdoc) = addShortWarnLocLine loc unqual sdoc
-- Display any warnings
; doIfSet (not (isEmptyBag ds_warns))
-- Display any warnings
; doIfSet (not (isEmptyBag ds_warns))
- (printErrs (pprBagOfWarnings ds_warns))
-- Dump output
; dumpIfSet_dyn dflags Opt_D_dump_ds "Desugared" (pprCoreExpr core_expr)
-- Dump output
; dumpIfSet_dyn dflags Opt_D_dump_ds "Desugared" (pprCoreExpr core_expr)
type DsWarnings = Bag DsWarning -- The desugarer reports matches which are
-- completely shadowed or incomplete patterns
type DsWarnings = Bag DsWarning -- The desugarer reports matches which are
-- completely shadowed or incomplete patterns
-type DsWarning = (Loc, SDoc)
+type DsWarning = (SrcLoc, SDoc)
{-# INLINE thenDs #-}
{-# INLINE returnDs #-}
{-# INLINE thenDs #-}
{-# INLINE returnDs #-}
tupleCon, parrFakeCon, mkPArrTy )
import BasicTypes ( Boxity(..) )
import UniqSet
tupleCon, parrFakeCon, mkPArrTy )
import BasicTypes ( Boxity(..) )
import UniqSet
-import SrcLoc ( noSrcLoc )x
+import SrcLoc ( noSrcLoc )
import Util ( lengthExceeds, isSingleton, notNull )
import Outputable
\end{code}
import Util ( lengthExceeds, isSingleton, notNull )
import Outputable
\end{code}