diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2013-06-21 13:58:24 +0100 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2013-06-21 13:58:24 +0100 |
commit | c30744cc4fcd3a048dab246058f4f6831f38d798 (patch) | |
tree | 6d4d0b1f5134e1a8a23af75c0bbc2d6fa90427f2 /testsuite/tests/indexed-types/should_fail/T7786.hs | |
parent | a26bf928d274f57c7c0c95df23c769244e90633e (diff) | |
download | haskell-c30744cc4fcd3a048dab246058f4f6831f38d798.tar.gz |
Updates to support closed type families.
Diffstat (limited to 'testsuite/tests/indexed-types/should_fail/T7786.hs')
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/T7786.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T7786.hs b/testsuite/tests/indexed-types/should_fail/T7786.hs index f2d119ba10..59c5fecab8 100644 --- a/testsuite/tests/indexed-types/should_fail/T7786.hs +++ b/testsuite/tests/indexed-types/should_fail/T7786.hs @@ -50,8 +50,7 @@ buryUnder (ps `Snoc` p) post acc = (ps `buryUnder` post) acc `Snoc` (p `under` p type key `KeyNotIn` inv = Intersect (More Empty key) inv ~ Empty type (lhs `UnderDisjoint` post) rhs = Intersect ((lhs `BuriedUnder` post) Empty) rhs ~ Empty -type family Intersect (l :: Inventory a) (r :: Inventory a) :: Inventory a -type instance where +type family Intersect (l :: Inventory a) (r :: Inventory a) :: Inventory a where Intersect Empty r = Empty Intersect l Empty = Empty Intersect (More ls l) r = InterAppend (Intersect ls r) r l @@ -59,8 +58,7 @@ type instance where type family InterAppend (l :: Inventory a) (r :: Inventory a) (one :: a) - :: Inventory a -type instance where + :: Inventory a where InterAppend acc Empty one = acc InterAppend acc (More rs one) one = More acc one InterAppend acc (More rs r) one = InterAppend acc rs one @@ -68,8 +66,7 @@ type instance where type family BuriedUnder (sub :: Inventory [KeySegment]) (post :: [KeySegment]) (inv :: Inventory [KeySegment]) - :: Inventory [KeySegment] -type instance where + :: Inventory [KeySegment] where BuriedUnder Empty post inv = inv BuriedUnder (More ps p) post inv = More ((ps `BuriedUnder` post) inv) (p `Under` post) |