summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorKirill Zaborsky <qrilka@gmail.com>2018-06-15 14:12:58 -0400
committerBen Gamari <ben@smart-cactus.org>2018-06-15 14:13:09 -0400
commit42f3b53b5bc4674e41f16de08094821fe1aaec00 (patch)
tree2c7d4355a4c1ecb90a2bece332ebac03a3c0fc71 /testsuite
parent7100850eebb1c1aec0aaabca08915bac8b90e188 (diff)
downloadhaskell-42f3b53b5bc4674e41f16de08094821fe1aaec00.tar.gz
Fix #13833: accept type literals with no FlexibleInstances
Test Plan: ./validate Reviewers: bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #13833 Differential Revision: https://phabricator.haskell.org/D4823
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T13833.hs12
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T13833.hs b/testsuite/tests/typecheck/should_compile/T13833.hs
new file mode 100644
index 0000000000..266b00bd60
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T13833.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE DataKinds, KindSignatures #-}
+
+import GHC.TypeLits (Nat, Symbol)
+
+class A (n::Nat)
+instance A 0
+
+class B (s::Symbol)
+instance B "B"
+
+main :: IO ()
+main = return ()
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 8a7a7da8ce..beaea5dcd1 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -623,3 +623,4 @@ test('T15050', [expect_broken(15050)], compile, [''])
test('T14735', normal, compile, [''])
test('T15180', normal, compile, [''])
test('T15232', normal, compile, [''])
+test('T13833', normal, compile, ['']) \ No newline at end of file