[commit: ghc] master: DynFlags: delete function that doesn't do anything (33742db)

git at git.haskell.org git at git.haskell.org
Tue Dec 15 00:37:51 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/33742db5798ef09192e8468af7dd71d58b316ab9/ghc

>---------------------------------------------------------------

commit 33742db5798ef09192e8468af7dd71d58b316ab9
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Tue Dec 15 01:07:39 2015 +0100

    DynFlags: delete function that doesn't do anything
    
    Reviewers: austin, bgamari
    
    Reviewed By: austin, bgamari
    
    Differential Revision: https://phabricator.haskell.org/D1606


>---------------------------------------------------------------

33742db5798ef09192e8468af7dd71d58b316ab9
 compiler/main/DynFlags.hs | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 7003a6c..98a3631 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -1328,14 +1328,6 @@ wayUnsetGeneralFlags _ WayDyn      = [-- There's no point splitting objects
 wayUnsetGeneralFlags _ WayProf     = []
 wayUnsetGeneralFlags _ WayEventLog = []
 
-wayExtras :: Platform -> Way -> DynFlags -> DynFlags
-wayExtras _ (WayCustom {}) dflags = dflags
-wayExtras _ WayThreaded dflags = dflags
-wayExtras _ WayDebug    dflags = dflags
-wayExtras _ WayDyn      dflags = dflags
-wayExtras _ WayProf     dflags = dflags
-wayExtras _ WayEventLog dflags = dflags
-
 wayOptc :: Platform -> Way -> [String]
 wayOptc _ (WayCustom {}) = []
 wayOptc platform WayThreaded = case platformOS platform of
@@ -3692,12 +3684,11 @@ addWay w = upd (addWay' w)
 addWay' :: Way -> DynFlags -> DynFlags
 addWay' w dflags0 = let platform = targetPlatform dflags0
                         dflags1 = dflags0 { ways = w : ways dflags0 }
-                        dflags2 = wayExtras platform w dflags1
-                        dflags3 = foldr setGeneralFlag' dflags2
+                        dflags2 = foldr setGeneralFlag' dflags1
                                         (wayGeneralFlags platform w)
-                        dflags4 = foldr unSetGeneralFlag' dflags3
+                        dflags3 = foldr unSetGeneralFlag' dflags2
                                         (wayUnsetGeneralFlags platform w)
-                    in dflags4
+                    in dflags3
 
 removeWayDyn :: DynP ()
 removeWayDyn = upd (\dfs -> dfs { ways = filter (WayDyn /=) (ways dfs) })



More information about the ghc-commits mailing list