Make Applicative a superclass of Monad
authorAustin Seipp <austin@well-typed.com>
Tue, 22 Apr 2014 11:09:40 +0000 (06:09 -0500)
committerAustin Seipp <austin@well-typed.com>
Tue, 9 Sep 2014 13:13:27 +0000 (08:13 -0500)
commitd94de87252d0fe2ae97341d186b03a2fbe136b04
tree1cac19f2786b1d8a1626886cd6373946a3a276b0
parentfdfe6c0e50001add357475a1a3a7627243a28a70
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
128 files changed:
aclocal.m4
compiler/cmm/CmmLayoutStack.hs
compiler/cmm/CmmLint.hs
compiler/cmm/PprC.hs
compiler/codeGen/StgCmmBind.hs
compiler/codeGen/StgCmmExpr.hs
compiler/codeGen/StgCmmExtCode.hs
compiler/codeGen/StgCmmForeign.hs
compiler/codeGen/StgCmmHeap.hs
compiler/codeGen/StgCmmLayout.hs
compiler/codeGen/StgCmmMonad.hs
compiler/codeGen/StgCmmPrim.hs
compiler/codeGen/StgCmmUtils.hs
compiler/coreSyn/CoreLint.lhs
compiler/deSugar/Coverage.lhs
compiler/deSugar/DsExpr.lhs
compiler/deSugar/MatchLit.lhs
compiler/ghci/ByteCodeAsm.lhs
compiler/ghci/ByteCodeGen.lhs
compiler/hsSyn/Convert.lhs
compiler/hsSyn/HsBinds.lhs
compiler/iface/IfaceSyn.lhs
compiler/iface/LoadIface.lhs
compiler/iface/MkIface.lhs
compiler/llvmGen/LlvmCodeGen/Base.hs
compiler/main/CmdLineParser.hs
compiler/main/DriverPipeline.hs
compiler/main/ErrUtils.lhs
compiler/main/Finder.lhs
compiler/main/HeaderInfo.hs
compiler/main/Packages.lhs
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/NCGMonad.hs
compiler/nativeGen/RegAlloc/Linear/State.hs
compiler/parser/Lexer.x
compiler/parser/RdrHsSyn.lhs
compiler/prelude/PrelNames.lhs
compiler/prelude/PrelRules.lhs
compiler/profiling/SCCfinal.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnExpr.lhs
compiler/rename/RnNames.lhs
compiler/simplCore/CoreMonad.lhs
compiler/specialise/Specialise.lhs
compiler/stgSyn/StgLint.lhs
compiler/typecheck/TcBinds.lhs
compiler/typecheck/TcDeriv.lhs
compiler/typecheck/TcExpr.lhs
compiler/typecheck/TcForeign.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcPat.lhs
compiler/typecheck/TcRnDriver.lhs
compiler/typecheck/TcRnMonad.lhs
compiler/typecheck/TcTyClsDecls.lhs
compiler/typecheck/TcTyDecls.lhs
compiler/typecheck/TcType.lhs
compiler/typecheck/TcUnify.lhs
compiler/typecheck/TcValidity.lhs
compiler/types/Unify.lhs
compiler/utils/IOEnv.hs
compiler/utils/Maybes.lhs
compiler/utils/Stream.hs
compiler/vectorise/Vectorise/Exp.hs
compiler/vectorise/Vectorise/Type/Env.hs
ghc/GhciMonad.hs
ghc/InteractiveUI.hs
libraries/base/Control/Applicative.hs
libraries/base/Control/Arrow.hs
libraries/base/Control/Monad.hs
libraries/base/Control/Monad/ST/Lazy/Imp.hs
libraries/base/Data/Either.hs
libraries/base/Data/Maybe.hs
libraries/base/Data/Monoid.hs
libraries/base/Data/Proxy.hs
libraries/base/Foreign/Storable.hs
libraries/base/GHC/Base.lhs
libraries/base/GHC/Conc/Sync.lhs
libraries/base/GHC/Event/Array.hs
libraries/base/GHC/Event/EPoll.hsc
libraries/base/GHC/Event/Internal.hs
libraries/base/GHC/Event/Manager.hs
libraries/base/GHC/Event/Poll.hsc
libraries/base/GHC/Event/TimerManager.hs
libraries/base/GHC/GHCi.hs
libraries/base/GHC/ST.lhs
libraries/base/Prelude.hs
libraries/base/Text/ParserCombinators/ReadP.hs
libraries/base/Text/ParserCombinators/ReadPrec.hs
libraries/template-haskell/Language/Haskell/TH/PprLib.hs
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
mk/validate-settings.mk
testsuite/tests/deriving/should_fail/T3621.hs
testsuite/tests/deriving/should_fail/T3621.stderr
testsuite/tests/deriving/should_run/drvrun019.hs
testsuite/tests/ghci/scripts/T4175.stdout
testsuite/tests/ghci/scripts/T7627.stdout
testsuite/tests/ghci/scripts/T8535.stdout
testsuite/tests/ghci/scripts/ghci011.stdout
testsuite/tests/ghci/scripts/ghci020.stdout
testsuite/tests/ghci/scripts/ghci025.stdout
testsuite/tests/ghci/scripts/ghci027.stdout
testsuite/tests/indexed-types/should_fail/T4485.hs
testsuite/tests/indexed-types/should_fail/T4485.stderr
testsuite/tests/indexed-types/should_fail/T7729.hs
testsuite/tests/indexed-types/should_fail/T7729.stderr
testsuite/tests/indexed-types/should_fail/T7729a.hs
testsuite/tests/indexed-types/should_fail/T7729a.stderr
testsuite/tests/mdo/should_compile/mdo002.hs
testsuite/tests/parser/should_compile/T7476/T7476.stdout
testsuite/tests/perf/compiler/all.T
testsuite/tests/perf/haddock/all.T
testsuite/tests/polykinds/MonoidsFD.hs
testsuite/tests/polykinds/MonoidsTF.hs
testsuite/tests/rebindable/rebindable2.hs
testsuite/tests/rename/should_compile/T1954.hs
testsuite/tests/rename/should_compile/T7145a.hs
testsuite/tests/rename/should_compile/T7145b.stderr
testsuite/tests/rename/should_fail/T2993.stderr
testsuite/tests/simplCore/should_compile/T8848.stderr
testsuite/tests/simplCore/should_compile/simpl017.hs
testsuite/tests/simplCore/should_compile/simpl017.stderr
testsuite/tests/simplCore/should_run/T3591.hs
testsuite/tests/typecheck/should_compile/T4524.hs
testsuite/tests/typecheck/should_compile/T4969.hs
testsuite/tests/typecheck/should_compile/tc213.hs
utils/ghc-pkg/Main.hs
utils/haddock
utils/hsc2hs