diff options
-rw-r--r-- | compiler/iface/MkIface.lhs | 1 | ||||
-rw-r--r-- | compiler/main/StaticFlags.hs | 1 | ||||
-rw-r--r-- | compiler/main/TidyPgm.lhs | 1 | ||||
-rw-r--r-- | compiler/stgSyn/StgLint.lhs | 1 | ||||
-rw-r--r-- | compiler/utils/Util.lhs | 6 | ||||
-rw-r--r-- | ghc/InteractiveUI.hs | 17 |
6 files changed, 14 insertions, 13 deletions
diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs index 7420dd8c32..090966090e 100644 --- a/compiler/iface/MkIface.lhs +++ b/compiler/iface/MkIface.lhs @@ -107,6 +107,7 @@ import Bag import Exception import Control.Monad +import Data.Function import Data.List import Data.Map (Map) import qualified Data.Map as Map diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index 3a4c2da9e4..4695d83ed0 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -98,6 +98,7 @@ import Maybes ( firstJusts ) import Panic import Control.Monad ( liftM3 ) +import Data.Function import Data.Maybe ( listToMaybe ) import Data.IORef import System.IO.Unsafe ( unsafePerformIO ) diff --git a/compiler/main/TidyPgm.lhs b/compiler/main/TidyPgm.lhs index 5cd3f76250..43a2db1e91 100644 --- a/compiler/main/TidyPgm.lhs +++ b/compiler/main/TidyPgm.lhs @@ -56,6 +56,7 @@ import Util import FastString import Control.Monad +import Data.Function import Data.List ( sortBy ) import Data.IORef ( readIORef, writeIORef ) \end{code} diff --git a/compiler/stgSyn/StgLint.lhs b/compiler/stgSyn/StgLint.lhs index ac394164b7..852202f5f7 100644 --- a/compiler/stgSyn/StgLint.lhs +++ b/compiler/stgSyn/StgLint.lhs @@ -26,6 +26,7 @@ import SrcLoc import Outputable import FastString import Control.Monad +import Data.Function #include "HsVersions.h" \end{code} diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index d87f526bc8..e22cde8434 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -46,7 +46,7 @@ module Util ( nTimes, -- * Sorting - sortLe, sortWith, minWith, on, + sortLe, sortWith, minWith, -- * Comparisons isEqual, eqListBy, eqMaybeBy, @@ -581,10 +581,6 @@ sortWith get_key xs = sortLe le xs minWith :: Ord b => (a -> b) -> [a] -> a minWith get_key xs = ASSERT( not (null xs) ) head (sortWith get_key xs) - -on :: (a -> a -> c) -> (b -> a) -> b -> b -> c -on cmp sel = \x y -> sel x `cmp` sel y - \end{code} %************************************************************************ diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index c56f5067f9..049b79eba9 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -62,6 +62,7 @@ import Control.Monad.IO.Class import Data.Array import qualified Data.ByteString.Char8 as BS import Data.Char +import Data.Function import Data.IORef ( IORef, readIORef, writeIORef ) import Data.List ( find, group, intercalate, intersperse, isPrefixOf, nub, partition, sort, sortBy ) @@ -989,12 +990,12 @@ filterOutChildren get_thing xs pprInfo :: PrintExplicitForalls -> (TyThing, Fixity, [GHC.ClsInst]) -> SDoc pprInfo pefas (thing, fixity, insts) = pprTyThingInContextLoc pefas thing - $$ show_fixity fixity + $$ show_fixity $$ vcat (map GHC.pprInstance insts) where - show_fixity fix - | fix == GHC.defaultFixity = empty - | otherwise = ppr fix <+> pprInfixName (GHC.getName thing) + show_fixity + | fixity == GHC.defaultFixity = empty + | otherwise = ppr fixity <+> pprInfixName (GHC.getName thing) ----------------------------------------------------------------------------- -- :main @@ -2151,11 +2152,11 @@ showBindings = do pprTT :: PrintExplicitForalls -> (TyThing, Fixity, [GHC.ClsInst]) -> SDoc pprTT pefas (thing, fixity, _insts) = pprTyThing pefas thing - $$ show_fixity fixity + $$ show_fixity where - show_fixity fix - | fix == GHC.defaultFixity = empty - | otherwise = ppr fix <+> ppr (GHC.getName thing) + show_fixity + | fixity == GHC.defaultFixity = empty + | otherwise = ppr fixity <+> ppr (GHC.getName thing) printTyThing :: TyThing -> GHCi () |