Add and use seqBitmap when constructing SRTs
[ghc-hetmet.git] / compiler / main / DynFlags.hs
index dbb791e..39459d3 100644 (file)
@@ -1478,26 +1478,31 @@ setDumpSimplPhases :: String -> DynP ()
 setDumpSimplPhases s = do setDynFlag Opt_ForceRecomp
                           upd (\s -> s { shouldDumpSimplPhase = spec })
   where
+    spec :: SimplifierMode -> Bool
     spec = join (||)
-         . map (join (&&))
-         . map (map match)
-         . map (split ':')
+         . map (join (&&) . map match . split ':')
          . split ','
          $ case s of
              '=' : s' -> s'
              _        -> s
 
+    join :: (Bool -> Bool -> Bool)
+        -> [SimplifierMode -> Bool]
+        -> SimplifierMode -> Bool
     join _  [] = const True
     join op ss = foldr1 (\f g x -> f x `op` g x) ss
 
+    match :: String -> SimplifierMode -> Bool
     match "" = const True
     match s  = case reads s of
                 [(n,"")] -> phase_num  n
                 _        -> phase_name s
 
+    phase_num :: Int -> SimplifierMode -> Bool
     phase_num n (SimplPhase k _) = n == k
     phase_num _ _                = False
 
+    phase_name :: String -> SimplifierMode -> Bool
     phase_name s SimplGently       = s == "gentle"
     phase_name s (SimplPhase _ ss) = s `elem` ss
 
@@ -1652,32 +1657,9 @@ splitPathList s = filter notNull (splitUp s)
 -- tmpDir, where we store temporary files.
 
 setTmpDir :: FilePath -> DynFlags -> DynFlags
-setTmpDir dir dflags = dflags{ tmpDir = canonicalise dir }
-  where
-#if !defined(mingw32_HOST_OS)
-     canonicalise p = normalise p
-#else
-     -- Canonicalisation of temp path under win32 is a bit more
-     -- involved: (a) strip trailing slash,
-     --      (b) normalise slashes
-     --     (c) just in case, if there is a prefix /cygdrive/x/, change to x:
-     canonicalise path = removeTrailingSlash $ normalise $ xltCygdrive path
-
-     -- if we're operating under cygwin, and TMP/TEMP is of
-     -- the form "/cygdrive/drive/path", translate this to
-     -- "drive:/path" (as GHC isn't a cygwin app and doesn't
-     -- understand /cygdrive paths.)
-     cygdrivePrefix = [pathSeparator] ++ "/cygdrive/" ++ [pathSeparator]
-     xltCygdrive path = case maybePrefixMatch cygdrivePrefix path of
-                        Just (drive:sep:xs)
-                         | isPathSeparator sep -> drive:':':pathSeparator:xs
-                        _ -> path
-
-     -- strip the trailing backslash (awful, but we only do this once).
-     removeTrailingSlash path
-      | isPathSeparator (last path) = init path
-      | otherwise                   = path
-#endif
+setTmpDir dir dflags = dflags{ tmpDir = normalise dir }
+  -- we used to fix /cygdrive/c/.. on Windows, but this doesn't
+  -- seem necessary now --SDM 7/2/2008
 
 -----------------------------------------------------------------------------
 -- Hpc stuff