summaryrefslogtreecommitdiff
path: root/ghc/GhciMonad.hs
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-04-22 06:09:40 -0500
committerAustin Seipp <austin@well-typed.com>2014-09-09 08:13:27 -0500
commitd94de87252d0fe2ae97341d186b03a2fbe136b04 (patch)
tree1cac19f2786b1d8a1626886cd6373946a3a276b0 /ghc/GhciMonad.hs
parentfdfe6c0e50001add357475a1a3a7627243a28a70 (diff)
downloadhaskell-d94de87252d0fe2ae97341d186b03a2fbe136b04.tar.gz
Make Applicative a superclass of Monad
Summary: This includes pretty much all the changes needed to make `Applicative` a superclass of `Monad` finally. There's mostly reshuffling in the interests of avoid orphans and boot files, but luckily we can resolve all of them, pretty much. The only catch was that Alternative/MonadPlus also had to go into Prelude to avoid this. As a result, we must update the hsc2hs and haddock submodules. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: Build things, they might not explode horribly. Reviewers: hvr, simonmar Subscribers: simonmar Differential Revision: https://phabricator.haskell.org/D13
Diffstat (limited to 'ghc/GhciMonad.hs')
-rw-r--r--ghc/GhciMonad.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/ghc/GhciMonad.hs b/ghc/GhciMonad.hs
index 22109c428d..89c2028960 100644
--- a/ghc/GhciMonad.hs
+++ b/ghc/GhciMonad.hs
@@ -48,7 +48,6 @@ import Data.IORef
import System.CPUTime
import System.Environment
import System.IO
-import Control.Applicative (Applicative(..))
import Control.Monad
import GHC.Exts
@@ -57,6 +56,10 @@ import qualified System.Console.Haskeline as Haskeline
import Control.Monad.Trans.Class
import Control.Monad.IO.Class
+#if __GLASGOW_HASKELL__ < 709
+import Control.Applicative (Applicative(..))
+#endif
+
-----------------------------------------------------------------------------
-- GHCi monad
@@ -138,7 +141,7 @@ prettyLocations locs = vcat $ map (\(i, loc) -> brackets (int i) <+> ppr loc) $
instance Outputable BreakLocation where
ppr loc = (ppr $ breakModule loc) <+> ppr (breakLoc loc) <+>
if null (onBreakCmd loc)
- then empty
+ then Outputable.empty
else doubleQuotes (text (onBreakCmd loc))
recordBreak :: BreakLocation -> GHCi (Bool{- was already present -}, Int)