summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-09-19 18:57:38 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-21 11:30:38 -0400
commitcc6be3a2f23c9b2e04f9f491099149e1e1d4d20b (patch)
tree994ddad3a92c6852cea2012c3ed8e2f1b143bf18 /testsuite
parent283eb1a08480195deb6691b51e6407490986f5f8 (diff)
downloadhaskell-cc6be3a2f23c9b2e04f9f491099149e1e1d4d20b.tar.gz
Typeable: Allow App to match arrow types
Test Plan: T14236 Reviewers: austin, hvr, goldfire Reviewed By: goldfire Subscribers: RyanGlScott, simonpj, rwbarton, goldfire, thomie, dfeuer GHC Trac Issues: #14236 Differential Revision: https://phabricator.haskell.org/D3969
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_run/T14236.hs14
-rw-r--r--testsuite/tests/typecheck/should_run/T14236.stdout3
-rwxr-xr-xtestsuite/tests/typecheck/should_run/all.T1
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/T14236.hs b/testsuite/tests/typecheck/should_run/T14236.hs
new file mode 100644
index 0000000000..c08682bc14
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/T14236.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE MagicHash #-}
+import GHC.Exts
+import Type.Reflection
+
+main = do
+ case typeRep @(Int -> Char) of
+ App a b -> print (a, b)
+
+ case typeRep @(Int# -> Char) of
+ App a b -> print (a, b)
+
+ case typeRep @(Int# -> Char) of
+ App a b -> print $ App a (typeRep @String)
diff --git a/testsuite/tests/typecheck/should_run/T14236.stdout b/testsuite/tests/typecheck/should_run/T14236.stdout
new file mode 100644
index 0000000000..a168ea8d04
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/T14236.stdout
@@ -0,0 +1,3 @@
+((->) 'LiftedRep 'LiftedRep Int,Char)
+((->) 'IntRep 'LiftedRep Int#,Char)
+Int# -> [Char]
diff --git a/testsuite/tests/typecheck/should_run/all.T b/testsuite/tests/typecheck/should_run/all.T
index 3fc1928d4a..1958001d16 100755
--- a/testsuite/tests/typecheck/should_run/all.T
+++ b/testsuite/tests/typecheck/should_run/all.T
@@ -123,3 +123,4 @@ test('TypeableEq', normal, compile_and_run, [''])
test('T13435', normal, compile_and_run, [''])
test('T11715', exit_code(1), compile_and_run, [''])
test('T13594a', normal, ghci_script, ['T13594a.script'])
+test('T14236', normal, compile_and_run, [''])