diff options
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r-- | testsuite/tests/polykinds/T10516.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T10516.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T9222.stderr | 48 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 1 |
4 files changed, 38 insertions, 24 deletions
diff --git a/testsuite/tests/polykinds/T10516.hs b/testsuite/tests/polykinds/T10516.hs new file mode 100644 index 0000000000..388f3421b8 --- /dev/null +++ b/testsuite/tests/polykinds/T10516.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE PolyKinds #-} +module T10516 where + +type App f a = f a + +newtype X f a = X (f a) + +f :: f a -> X (App f) a +f = X diff --git a/testsuite/tests/polykinds/T10516.stderr b/testsuite/tests/polykinds/T10516.stderr new file mode 100644 index 0000000000..0242722ea5 --- /dev/null +++ b/testsuite/tests/polykinds/T10516.stderr @@ -0,0 +1,4 @@ +
+T10516.hs:8:6: error:
+ The type synonym ‘App’ should have 2 arguments, but has been given 1
+ In the type signature for ‘f’: f :: f a -> X (App f) a
diff --git a/testsuite/tests/polykinds/T9222.stderr b/testsuite/tests/polykinds/T9222.stderr index 01869edd45..1d1a1df779 100644 --- a/testsuite/tests/polykinds/T9222.stderr +++ b/testsuite/tests/polykinds/T9222.stderr @@ -1,24 +1,24 @@ - -T9222.hs:13:3: - Couldn't match type ‘b0’ with ‘b’ - ‘b0’ is untouchable - inside the constraints: a ~ '(b0, c0) - bound by the type of the constructor ‘Want’: - (a ~ '(b0, c0)) => Proxy b0 - at T9222.hs:13:3 - ‘b’ is a rigid type variable bound by - the type of the constructor ‘Want’: - ((a ~ '(b, c)) => Proxy b) -> Want a - at T9222.hs:13:3 - Expected type: '(b, c) - Actual type: a - In the ambiguity check for the type of the constructor ‘Want’: - Want :: forall (k :: BOX) - (k1 :: BOX) - (a :: (,) k k1) - (b :: k) - (c :: k1). - ((a ~ '(b, c)) => Proxy b) -> Want a - To defer the ambiguity check to use sites, enable AllowAmbiguousTypes - In the definition of data constructor ‘Want’ - In the data declaration for ‘Want’ +
+T9222.hs:13:3: error:
+ Couldn't match type ‘b0’ with ‘b’
+ ‘b0’ is untouchable
+ inside the constraints: a ~ '(b0, c0)
+ bound by the type of the constructor ‘Want’:
+ (a ~ '(b0, c0)) => Proxy b0
+ at T9222.hs:13:3
+ ‘b’ is a rigid type variable bound by
+ the type of the constructor ‘Want’:
+ ((a ~ '(b, c)) => Proxy b) -> Want a
+ at T9222.hs:13:3
+ Expected type: '(b, c)
+ Actual type: a
+ In the ambiguity check for the type of the constructor ‘Want’:
+ Want :: forall (k :: BOX)
+ (k1 :: BOX)
+ (a :: (,) k k1)
+ (b :: k)
+ (c :: k1).
+ ((a ~ '(b, c)) => Proxy b) -> Want a
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the definition of data constructor ‘Want’
+ In the data type declaration for ‘Want’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 75d2321aad..76af3ecf00 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -116,3 +116,4 @@ test('T9833', normal, compile, ['']) test('T7908', normal, compile, ['']) test('T10041', normal, compile, ['']) test('T10451', normal, compile_fail, ['']) +test('T10516', normal, compile_fail, ['']) |