diff options
author | Torsten Schmits <git@tryp.io> | 2022-07-20 13:12:43 +0200 |
---|---|---|
committer | Torsten Schmits <git@tryp.io> | 2022-07-20 13:12:43 +0200 |
commit | 7c86817ef75c217c61de15b61e02e1349bfef876 (patch) | |
tree | 16ba0777bff45f7c1e462b38905374f44efbeaab | |
parent | 73f946ca95cfe75c5d1870ab8864ec77674e3cf7 (diff) | |
download | haskell-7c86817ef75c217c61de15b61e02e1349bfef876.tar.gz |
add more tests
-rw-r--r-- | testsuite/tests/implicitforall/no-ifa-data-fail.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/implicitforall/no-ifa-data-fail.stderr | 14 | ||||
-rw-r--r-- | testsuite/tests/implicitforall/no-ifa-data.hs | 14 |
3 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/tests/implicitforall/no-ifa-data-fail.hs b/testsuite/tests/implicitforall/no-ifa-data-fail.hs index 996c72d636..b84481b094 100644 --- a/testsuite/tests/implicitforall/no-ifa-data-fail.hs +++ b/testsuite/tests/implicitforall/no-ifa-data-fail.hs @@ -13,3 +13,17 @@ type family F a :: b data family DF a :: a data instance DF (Maybe a) :: Maybe a + +data E where + E :: a -> (a -> Int) -> E + +class C a where + type AssocC a :: k -> Type + +class D a where + type AssocD a :: Type -> Type + +data family DF2 :: k -> Type + +data instance DF2 :: (k -> Type) -> Type where + DF2 :: (forall x. x -> f x) -> DF2 f diff --git a/testsuite/tests/implicitforall/no-ifa-data-fail.stderr b/testsuite/tests/implicitforall/no-ifa-data-fail.stderr index ebb3210a71..a05384e4be 100644 --- a/testsuite/tests/implicitforall/no-ifa-data-fail.stderr +++ b/testsuite/tests/implicitforall/no-ifa-data-fail.stderr @@ -7,3 +7,17 @@ no-ifa-data-fail.hs:11:20: Not in scope: type variable ‘b’ no-ifa-data-fail.hs:15:25: Not in scope: type variable ‘a’ no-ifa-data-fail.hs:15:37: Not in scope: type variable ‘a’ + +no-ifa-data-fail.hs:18:8: Not in scope: type variable ‘a’ + +no-ifa-data-fail.hs:18:14: Not in scope: type variable ‘a’ + +no-ifa-data-fail.hs:21:20: Not in scope: type variable ‘k’ + +no-ifa-data-fail.hs:26:20: Not in scope: type variable ‘k’ + +no-ifa-data-fail.hs:28:23: Not in scope: type variable ‘k’ + +no-ifa-data-fail.hs:29:26: Not in scope: type variable ‘f’ + +no-ifa-data-fail.hs:29:38: Not in scope: type variable ‘f’ diff --git a/testsuite/tests/implicitforall/no-ifa-data.hs b/testsuite/tests/implicitforall/no-ifa-data.hs index f65bdce4ba..73e4c1f9c0 100644 --- a/testsuite/tests/implicitforall/no-ifa-data.hs +++ b/testsuite/tests/implicitforall/no-ifa-data.hs @@ -15,3 +15,17 @@ type F2 :: forall k . Type -> k -> Type type family F2 a type instance F2 Int = D + +data E where + E :: forall a . a -> (a -> Int) -> E + +class C1 k a where + type Assoc1 a :: k -> Type + +class C2 (a :: k2) where + type Assoc2 a :: forall k . k -> Type + +data family DF2 :: forall k . k -> Type + +data instance DF2 :: forall k . (k -> Type) -> Type where + DF2 :: forall f . (forall x. x -> f x) -> DF2 f |