From 29ac8506edc946373ae19d61f9ed105d3a834bca Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones <simonpj@microsoft.com> Date: Tue, 25 Oct 2011 16:23:26 +0100 Subject: Test :kind and :kind! commands --- testsuite/tests/ghci/scripts/GhciKinds.hs | 6 ++++++ testsuite/tests/ghci/scripts/GhciKinds.script | 5 +++++ testsuite/tests/ghci/scripts/GhciKinds.stdout | 5 +++++ testsuite/tests/ghci/scripts/all.T | 1 + 4 files changed, 17 insertions(+) create mode 100644 testsuite/tests/ghci/scripts/GhciKinds.hs create mode 100644 testsuite/tests/ghci/scripts/GhciKinds.script create mode 100644 testsuite/tests/ghci/scripts/GhciKinds.stdout (limited to 'testsuite/tests/ghci') diff --git a/testsuite/tests/ghci/scripts/GhciKinds.hs b/testsuite/tests/ghci/scripts/GhciKinds.hs new file mode 100644 index 0000000000..4945814ff9 --- /dev/null +++ b/testsuite/tests/ghci/scripts/GhciKinds.hs @@ -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 index 0000000000..310c2a8c3d --- /dev/null +++ b/testsuite/tests/ghci/scripts/GhciKinds.script @@ -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 index 0000000000..3961994e09 --- /dev/null +++ b/testsuite/tests/ghci/scripts/GhciKinds.stdout @@ -0,0 +1,5 @@ +Int :: * +Maybe :: * -> * +F [[[Int]]] :: * +F [[[Int]]] :: * += [[Int]] -> [Int] -> Int -> Bool diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 2015b8f34e..add74a8e61 100644 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -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']) -- cgit v1.2.1