diff options
author | Kirill Zaborsky <qrilka@gmail.com> | 2018-06-15 14:12:58 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-06-15 14:13:09 -0400 |
commit | 42f3b53b5bc4674e41f16de08094821fe1aaec00 (patch) | |
tree | 2c7d4355a4c1ecb90a2bece332ebac03a3c0fc71 /testsuite/tests | |
parent | 7100850eebb1c1aec0aaabca08915bac8b90e188 (diff) | |
download | haskell-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/tests')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T13833.hs | 12 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
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 |