diff options
-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, ['']) |