Test :kind and :kind! commands
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 25 Oct 2011 15:23:26 +0000 (16:23 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 25 Oct 2011 15:23:26 +0000 (16:23 +0100)
testsuite/tests/ghci/scripts/GhciKinds.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/GhciKinds.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/GhciKinds.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T

diff --git a/testsuite/tests/ghci/scripts/GhciKinds.hs b/testsuite/tests/ghci/scripts/GhciKinds.hs
new file mode 100644 (file)
index 0000000..4945814
--- /dev/null
@@ -0,0 +1,6 @@
+{-# LANGUAGE TypeFamilies #-}
+module GhciKinds where
+
+type family F a :: *
+type instance F [a] = a -> F a
+type instance F Int = Bool
diff --git a/testsuite/tests/ghci/scripts/GhciKinds.script b/testsuite/tests/ghci/scripts/GhciKinds.script
new file mode 100644 (file)
index 0000000..310c2a8
--- /dev/null
@@ -0,0 +1,5 @@
+:kind Int
+:kind Maybe
+:l GhciKinds
+:kind F [[[Int]]]
+:kind! F [[[Int]]]
diff --git a/testsuite/tests/ghci/scripts/GhciKinds.stdout b/testsuite/tests/ghci/scripts/GhciKinds.stdout
new file mode 100644 (file)
index 0000000..3961994
--- /dev/null
@@ -0,0 +1,5 @@
+Int :: *
+Maybe :: * -> *
+F [[[Int]]] :: *
+F [[[Int]]] :: *
+= [[Int]] -> [Int] -> Int -> Bool
index 2015b8f..add74a8 100644 (file)
@@ -106,3 +106,4 @@ test('T5417', normal, ghci_script, ['T5417.script'])
 test('T5545', normal, ghci_script, ['T5545.script'])
 test('T5557', normal, ghci_script, ['T5557.script'])
 test('T5566', normal, ghci_script, ['T5566.script'])
+test('GhciKinds', normal, ghci_script, ['GhciKinds.script'])