summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-01-19 13:17:50 +0000
committerIan Lynagh <igloo@earth.li>2012-01-19 13:17:50 +0000
commit3220e571006d9ec1fc20aaf210187189b4b146cc (patch)
tree2530379f06df81b4c9df7af99ff88dae0970af6f /compiler
parent8bdcc5cf6896260eb520f18fa2475af10a969dbe (diff)
downloadhaskell-3220e571006d9ec1fc20aaf210187189b4b146cc.tar.gz
Remove getDOptsDs; use getDynFlags instead
Diffstat (limited to 'compiler')
-rw-r--r--compiler/deSugar/DsExpr.lhs2
-rw-r--r--compiler/deSugar/DsListComp.lhs2
-rw-r--r--compiler/deSugar/DsMonad.lhs7
-rw-r--r--compiler/deSugar/Match.lhs2
4 files changed, 5 insertions, 8 deletions
diff --git a/compiler/deSugar/DsExpr.lhs b/compiler/deSugar/DsExpr.lhs
index 157754bdfb..b34640a010 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 4ad8006b39..917e8b19ed 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 551165a3ad..1da9024122 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 cd0153e3ac..974d3183a7 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