diff options
author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2008-10-02 05:50:02 +0000 |
---|---|---|
committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2008-10-02 05:50:02 +0000 |
commit | 5bbdbfa2ded52f3c41cb501288d696b0de05a0a6 (patch) | |
tree | 35d777644a95771ae5c666ef8246f2e0ee03e76c /testsuite/tests/ghc-regress/indexed-types/should_compile/T2291.hs | |
parent | 21607c1615cfbaaf18ac36782140ec7575c7c98b (diff) | |
download | haskell-5bbdbfa2ded52f3c41cb501288d696b0de05a0a6.tar.gz |
TFs: T2291
Diffstat (limited to 'testsuite/tests/ghc-regress/indexed-types/should_compile/T2291.hs')
-rw-r--r-- | testsuite/tests/ghc-regress/indexed-types/should_compile/T2291.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/indexed-types/should_compile/T2291.hs b/testsuite/tests/ghc-regress/indexed-types/should_compile/T2291.hs new file mode 100644 index 0000000000..4a7b4e9746 --- /dev/null +++ b/testsuite/tests/ghc-regress/indexed-types/should_compile/T2291.hs @@ -0,0 +1,15 @@ +{-# OPTIONS_GHC -fglasgow-exts #-} +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 + #-} |