summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/ghci047.script
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-07-31 15:49:14 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-07-31 15:49:45 +0100
commit1ae5fa451f4f554e0d652d55f9312a585188ce13 (patch)
tree1d0ef82924eedf6803b48b8d0ba7748f9622b227 /testsuite/tests/ghci/scripts/ghci047.script
parentbfaa17998ed0cb8b22132d8e824b274ac5f038cc (diff)
downloadhaskell-1ae5fa451f4f554e0d652d55f9312a585188ce13.tar.gz
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.
Diffstat (limited to 'testsuite/tests/ghci/scripts/ghci047.script')
-rw-r--r--testsuite/tests/ghci/scripts/ghci047.script6
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/ghci/scripts/ghci047.script b/testsuite/tests/ghci/scripts/ghci047.script
index 49d93047f6..70cc5181d8 100644
--- a/testsuite/tests/ghci/scripts/ghci047.script
+++ b/testsuite/tests/ghci/scripts/ghci047.script
@@ -1,7 +1,6 @@
--Testing GADTs, type families as well as a ton of crazy type stuff
:set -XGADTs
:set -XTypeFamilies
-:set -XOverlappingInstances
:set -XFunctionalDependencies
:set -XFlexibleContexts
:set -XFlexibleInstances
@@ -22,8 +21,9 @@ data HTrue
data HFalse
class TypeEq x y b | x y -> b
-instance (HTrue ~ b) => TypeEq x x b
-instance (HFalse ~ b) => TypeEq x y b
+instance {-# OVERLAPS #-} (HTrue ~ b) => TypeEq x x b
+instance {-# OVERLAPS #-} (HTrue ~ b) => TypeEq x x b
+instance {-# OVERLAPS #-} (HFalse ~ b) => TypeEq x y b
type family Or a b
type instance Or HTrue HTrue = HTrue