Complete work on new OVERLAPPABLE/OVERLAPPING pragmas (Trac #9242)
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 31 Jul 2014 14:49:14 +0000 (15:49 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 31 Jul 2014 14:49:45 +0000 (15:49 +0100)
commit1ae5fa451f4f554e0d652d55f9312a585188ce13
tree1d0ef82924eedf6803b48b8d0ba7748f9622b227
parentbfaa17998ed0cb8b22132d8e824b274ac5f038cc
Complete work on new OVERLAPPABLE/OVERLAPPING pragmas (Trac #9242)

* Deprecate -XOverlappingInstances

* Update test suite.  Several tests even had entirely unnecessary
  uses of -XOverlappingInstances

* Update user manual with a careful description of the instance
  resolution story

* Fix an outright bug in the handling of duplidate instances in GHCi,
  which are meant to silently overwrite the earlier duplicate. The
  logic was right for family instances but was both more complicated,
  and plain wrong, for class instances.  (If you are interested, the
  bug was that we were eliminating the duplicate from the InstEnv, but
  not from the [ClsInst] held in tcg_insts.)  Test is ghci044a.
60 files changed:
compiler/basicTypes/BasicTypes.lhs
compiler/main/DynFlags.hs
compiler/main/HscTypes.lhs
compiler/typecheck/Inst.lhs
compiler/typecheck/TcRnTypes.lhs
compiler/types/FamInstEnv.lhs
compiler/types/InstEnv.lhs
docs/users_guide/glasgow_exts.xml
testsuite/tests/deriving/should_compile/T4966.hs
testsuite/tests/deriving/should_compile/T4966.stderr
testsuite/tests/generics/Uniplate/GUniplate.hs
testsuite/tests/ghci.debugger/scripts/print019.stderr
testsuite/tests/ghci/prog007/C.hs
testsuite/tests/ghci/scripts/all.T
testsuite/tests/ghci/scripts/ghci044.script
testsuite/tests/ghci/scripts/ghci044.stderr
testsuite/tests/ghci/scripts/ghci044a.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/ghci044a.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/ghci044a.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/ghci047.script
testsuite/tests/indexed-types/should_compile/Gentle.hs
testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
testsuite/tests/indexed-types/should_compile/NonLinearLHS.hs
testsuite/tests/indexed-types/should_fail/T4246.hs
testsuite/tests/indexed-types/should_fail/T4485.hs
testsuite/tests/indexed-types/should_fail/T4485.stderr
testsuite/tests/indexed-types/should_fail/T5439.hs
testsuite/tests/indexed-types/should_fail/T5439.stderr
testsuite/tests/perf/compiler/T5321FD.hs
testsuite/tests/perf/compiler/T5321Fun.hs
testsuite/tests/roles/should_compile/T8958.stderr
testsuite/tests/safeHaskell/ghci/p13.script
testsuite/tests/safeHaskell/ghci/p13.stderr
testsuite/tests/safeHaskell/safeInfered/UnsafeInfered08_A.hs
testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr
testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs
testsuite/tests/simplCore/should_compile/T5359b.hs
testsuite/tests/simplCore/should_compile/T5359b.stderr
testsuite/tests/simplCore/should_compile/simpl007.hs
testsuite/tests/th/T4135a.hs
testsuite/tests/typecheck/should_compile/FD4.hs
testsuite/tests/typecheck/should_compile/LoopOfTheDay3.hs
testsuite/tests/typecheck/should_compile/Makefile
testsuite/tests/typecheck/should_compile/T1470.hs
testsuite/tests/typecheck/should_compile/T3018.hs
testsuite/tests/typecheck/should_compile/T3108.hs
testsuite/tests/typecheck/should_compile/Tc173a.hs
testsuite/tests/typecheck/should_compile/Tc173b.hs
testsuite/tests/typecheck/should_compile/tc176.hs
testsuite/tests/typecheck/should_compile/tc179.hs
testsuite/tests/typecheck/should_fail/LongWayOverlapping.hs
testsuite/tests/typecheck/should_fail/LongWayOverlapping.stderr
testsuite/tests/typecheck/should_fail/T2307.hs
testsuite/tests/typecheck/should_fail/T5051.hs
testsuite/tests/typecheck/should_fail/T5051.stderr
testsuite/tests/typecheck/should_fail/T5095.hs
testsuite/tests/typecheck/should_fail/T5095.stderr
testsuite/tests/typecheck/should_fail/tcfail121.hs
testsuite/tests/typecheck/should_fail/tcfail121.stderr
testsuite/tests/typecheck/should_fail/tcfail202.hs