diff options
author | Gabor Greif <ggreif@gmail.com> | 2015-06-15 11:00:45 +0200 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2015-06-15 11:00:45 +0200 |
commit | a607011dbf522c97c9b6428ffa3203c56ab8dde6 (patch) | |
tree | 793fd11848c8773144fbc7ac37224f9201d94970 /testsuite | |
parent | dd3080fe0263082f65bf2570f49189c277b12e28 (diff) | |
download | haskell-a607011dbf522c97c9b6428ffa3203c56ab8dde6.tar.gz |
Test Trac #10348
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T10348.hs | 20 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T10348.hs b/testsuite/tests/typecheck/should_compile/T10348.hs new file mode 100644 index 0000000000..e8ec37c247 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T10348.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE AutoDeriveTypeable, GADTs, DataKinds, KindSignatures, StandaloneDeriving #-} + +module T10348 where + +import GHC.TypeLits +import Data.Typeable + +data Foo (n :: Nat) where + Hey :: KnownNat n => Foo n + +deriving instance Show (Foo n) + +data T t where + T :: (Show t, Typeable t) => t -> T t + +deriving instance Show (T n) + +hey :: (Typeable n, KnownNat n) => T (Foo n) +-- SHOULD BE: hey :: KnownNat n => T (Foo n) +hey = T Hey diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index bd87afb5ce..8f42129e5d 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -458,3 +458,4 @@ test('T8555', normal, compile, ['']) test('T8799', normal, compile, ['']) test('T10423', normal, compile, ['']) test('T10489', normal, compile, ['']) +test('T10348', normal, compile, ['']) |