diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-02-08 23:31:04 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-02-09 16:34:01 -0500 |
commit | c22cd7cc28238cf84f90dda9961064f5ea44761d (patch) | |
tree | 7a853de710dfc5fcb8ea0abe8a9901d6400ad806 | |
parent | b92ca83eed162764ab50f1a9e7b73a70988a3551 (diff) | |
download | haskell-c22cd7cc28238cf84f90dda9961064f5ea44761d.tar.gz |
testsuite: Add testcase for #13248
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T13248.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/T13248.hs b/testsuite/tests/typecheck/should_compile/T13248.hs new file mode 100644 index 0000000000..b2eebc700d --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T13248.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE TypeFamilies, TypeFamilyDependencies, UndecidableInstances #-} + +type family Foo a = r | r -> a where + Foo Int = Char + Foo Integer = String + +type family Bar a = r | r -> a where + Bar Char = Double + Bar String = Float + +type family Baz a = r | r -> a where + Baz x = Bar (Foo x) diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index ccebf75765..7d2e3c664a 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -535,3 +535,4 @@ test('T13083', normal, compile, ['']) test('T11723', normal, compile, ['']) test('T12987', normal, compile, ['']) test('T11736', normal, compile, ['']) +test('T13248', expect_broken(13248), compile, ['']) |