summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/indexed-types/should_fail/T2544.hs
blob: 22f3995286eec56c5b2f04d0f84b8f2e20437fd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE TypeOperators, TypeFamilies #-}

module T2544 where

data (:|:) a b = Inl a | Inr b

class Ix i where
   type IxMap i :: * -> *
   empty  :: IxMap i [Int]

data BiApp a b c = BiApp (a c) (b c)

instance (Ix l, Ix r) => Ix (l :|: r) where
   type IxMap (l :|: r) = BiApp (IxMap l) (IxMap r)
   empty = BiApp empty empty