[commit: ghc] master: Add test for Trac #14580 (6f6d105)
git at git.haskell.org
git at git.haskell.org
Thu Dec 14 11:39:56 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6f6d1050d96e6697cc4559eb54d03959efe28de1/ghc
>---------------------------------------------------------------
commit 6f6d1050d96e6697cc4559eb54d03959efe28de1
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Dec 14 11:39:19 2017 +0000
Add test for Trac #14580
>---------------------------------------------------------------
6f6d1050d96e6697cc4559eb54d03959efe28de1
testsuite/tests/polykinds/T14580.hs | 8 ++++++++
testsuite/tests/polykinds/T14580.stderr | 6 ++++++
testsuite/tests/polykinds/all.T | 1 +
3 files changed, 15 insertions(+)
diff --git a/testsuite/tests/polykinds/T14580.hs b/testsuite/tests/polykinds/T14580.hs
new file mode 100644
index 0000000..6d11d78
--- /dev/null
+++ b/testsuite/tests/polykinds/T14580.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE PolyKinds, DataKinds, TypeInType, TypeOperators #-}
+module T14580 where
+import Data.Kind
+
+type Cat ob = ob -> ob -> Type
+data ISO' :: Cat i -> i -> i -> Type
+type ISO cat a b = ISO' cat a b -> Type
+type (a <--> b) iso cat = ISO (iso :: cat a b)
diff --git a/testsuite/tests/polykinds/T14580.stderr b/testsuite/tests/polykinds/T14580.stderr
new file mode 100644
index 0000000..babbb49
--- /dev/null
+++ b/testsuite/tests/polykinds/T14580.stderr
@@ -0,0 +1,6 @@
+
+T14580.hs:8:31: error:
+ • Expected kind ‘Cat a’, but ‘(iso :: cat a b)’ has kind ‘cat a b’
+ • In the first argument of ‘ISO’, namely ‘(iso :: cat a b)’
+ In the type ‘ISO (iso :: cat a b)’
+ In the type declaration for ‘<-->’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 4c4d01b..89ebc2a 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -181,4 +181,5 @@ test('T11203', normal, compile_fail, [''])
test('T14555', normal, compile_fail, [''])
test('T14563', normal, compile_fail, [''])
test('T14561', normal, compile_fail, [''])
+test('T14580', normal, compile_fail, [''])
More information about the ghc-commits
mailing list