diff options
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/T2291.hs')
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/T2291.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T2291.hs b/testsuite/tests/indexed-types/should_compile/T2291.hs new file mode 100644 index 0000000000..a6832b60ad --- /dev/null +++ b/testsuite/tests/indexed-types/should_compile/T2291.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE TypeFamilies #-} +module Small where + +class CoCCC k where + type Coexp k :: * -> * -> * + type Sum k :: * -> * -> * + coapply :: k b (Sum k (Coexp k a b) a) + cocurry :: k c (Sum k a b) -> k (Coexp k b c) a + uncocurry :: k (Coexp k b c) a -> k c (Sum k a b) + +{-# RULES +"cocurry coapply" cocurry coapply = id +"cocurry . uncocurry" cocurry . uncocurry = id +"uncocurry . cocurry" uncocurry . cocurry = id + #-} |