diff options
author | Andrzej Rybczak <andrzej@rybczak.net> | 2020-10-29 21:36:31 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-10-31 09:27:34 -0400 |
commit | eb368078204bceba51e3c80e387ce1d776762cfd (patch) | |
tree | 9e277dfa4e8212d35abe52f7819b281e1f3fe24b | |
parent | cb1f755c6fb77f140aee11fdc7b4da04dd5dcd02 (diff) | |
download | haskell-eb368078204bceba51e3c80e387ce1d776762cfd.tar.gz |
Add testcase for #816
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T816.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T816.hs b/testsuite/tests/typecheck/should_compile/T816.hs new file mode 100644 index 0000000000..4c319ea5be --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T816.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE FunctionalDependencies #-} +{-# LANGUAGE UndecidableInstances #-} + +module T816 where + +class Foo x y | x -> y where + foo :: x -> y + +class Bar x y where + bar :: x -> y -> Int + +instance (Foo x y, Bar y z) => Bar x z where + bar x z = bar (foo x) z diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 060d179400..faac5bba9f 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -266,6 +266,7 @@ test('FD3', normal, compile_fail, ['']) test('FD4', normal, compile, ['']) test('faxen', normal, compile, ['']) +test('T816', normal, compile, ['']) test('T1495', normal, compile, ['']) test('T2045', normal, compile, ['']) # Needs -fhpc test('T2478', normal, compile, ['']) |