diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-10-10 13:57:01 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-10-10 13:57:01 +0100 |
commit | a6111b8cc14a5dc019e2613f6f634dec4eb57a8a (patch) | |
tree | a7be86b840b0416f8b43deec8cc495d70fe9c4ce /testsuite/tests/indexed-types/should_compile/T12522b.hs | |
parent | cc5ca21b6595d550b27439699cc223c7b0ceab61 (diff) | |
download | haskell-a6111b8cc14a5dc019e2613f6f634dec4eb57a8a.tar.gz |
More tests for Trac #12522
These ones test the variations in coment:15 of the ticket
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/T12522b.hs')
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/T12522b.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T12522b.hs b/testsuite/tests/indexed-types/should_compile/T12522b.hs new file mode 100644 index 0000000000..75013823c9 --- /dev/null +++ b/testsuite/tests/indexed-types/should_compile/T12522b.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE TypeFamilyDependencies #-} +{-# LANGUAGE TypeOperators #-} + +module T12522a where + +newtype I a = I a + +type family Curry (as :: [*]) b = f | f -> as b where + Curry '[] b = I b + Curry (a:as) b = a -> Curry as b + +data Uncurried (as :: [*]) b + +def :: Curry as b -> Uncurried as b +def = undefined + +-- test2 :: Uncurried [Bool, Bool] Bool +test2 = def $ \a b -> I $ a && b |