[commit: ghc] master: Remove getDOptsDs; use getDynFlags instead (3220e57)
Ian Lynagh
igloo at earth.li
Thu Jan 19 15:30:26 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/3220e571006d9ec1fc20aaf210187189b4b146cc
>---------------------------------------------------------------
commit 3220e571006d9ec1fc20aaf210187189b4b146cc
Author: Ian Lynagh <igloo at earth.li>
Date: Thu Jan 19 13:17:50 2012 +0000
Remove getDOptsDs; use getDynFlags instead
>---------------------------------------------------------------
compiler/deSugar/DsExpr.lhs | 2 +-
compiler/deSugar/DsListComp.lhs | 2 +-
compiler/deSugar/DsMonad.lhs | 7 ++-----
compiler/deSugar/Match.lhs | 2 +-
4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/compiler/deSugar/DsExpr.lhs b/compiler/deSugar/DsExpr.lhs
index 157754b..b34640a 100644
--- a/compiler/deSugar/DsExpr.lhs
+++ b/compiler/deSugar/DsExpr.lhs
@@ -683,7 +683,7 @@ makes all list literals be generated via the simple route.
dsExplicitList :: PostTcType -> [LHsExpr Id] -> DsM CoreExpr
-- See Note [Desugaring explicit lists]
dsExplicitList elt_ty xs
- = do { dflags <- getDOptsDs
+ = do { dflags <- getDynFlags
; xs' <- mapM dsLExpr xs
; let (dynamic_prefix, static_suffix) = spanTail is_static xs'
; if opt_SimpleListLiterals -- -fsimple-list-literals
diff --git a/compiler/deSugar/DsListComp.lhs b/compiler/deSugar/DsListComp.lhs
index 4ad8006..917e8b1 100644
--- a/compiler/deSugar/DsListComp.lhs
+++ b/compiler/deSugar/DsListComp.lhs
@@ -47,7 +47,7 @@ dsListComp :: [LStmt Id]
-> Type -- Type of entire list
-> DsM CoreExpr
dsListComp lquals res_ty = do
- dflags <- getDOptsDs
+ dflags <- getDynFlags
let quals = map unLoc lquals
elt_ty = case tcTyConAppArgs res_ty of
[elt_ty] -> elt_ty
diff --git a/compiler/deSugar/DsMonad.lhs b/compiler/deSugar/DsMonad.lhs
index 551165a..1da9024 100644
--- a/compiler/deSugar/DsMonad.lhs
+++ b/compiler/deSugar/DsMonad.lhs
@@ -20,7 +20,7 @@ module DsMonad (
mkPrintUnqualifiedDs,
newUnique,
UniqSupply, newUniqueSupply,
- getDOptsDs, getGhcModeDs, doptDs, woptDs,
+ getGhcModeDs, doptDs, woptDs,
dsLookupGlobal, dsLookupGlobalId, dsDPHBuiltin, dsLookupTyCon, dsLookupDataCon,
PArrBuiltin(..),
@@ -346,9 +346,6 @@ We can also reach out and either set/grab location information from
the @SrcSpan@ being carried around.
\begin{code}
-getDOptsDs :: DsM DynFlags
-getDOptsDs = getDOpts
-
doptDs :: DynFlag -> TcRnIf gbl lcl Bool
doptDs = doptM
@@ -356,7 +353,7 @@ woptDs :: WarningFlag -> TcRnIf gbl lcl Bool
woptDs = woptM
getGhcModeDs :: DsM GhcMode
-getGhcModeDs = getDOptsDs >>= return . ghcMode
+getGhcModeDs = getDynFlags >>= return . ghcMode
getModuleDs :: DsM Module
getModuleDs = do { env <- getGblEnv; return (ds_mod env) }
diff --git a/compiler/deSugar/Match.lhs b/compiler/deSugar/Match.lhs
index cd0153e..974d318 100644
--- a/compiler/deSugar/Match.lhs
+++ b/compiler/deSugar/Match.lhs
@@ -66,7 +66,7 @@ matchCheck :: DsMatchContext
-> DsM MatchResult -- Desugared result!
matchCheck ctx vars ty qs
- = do { dflags <- getDOptsDs
+ = do { dflags <- getDynFlags
; matchCheck_really dflags ctx vars ty qs }
matchCheck_really :: DynFlags
More information about the Cvs-ghc
mailing list