Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/3a53961eddc253ad2f681bb7b1b99d75899602d3 >--------------------------------------------------------------- commit 3a53961eddc253ad2f681bb7b1b99d75899602d3 Author: Dimitrios Vytiniotis <[email protected]> Date: Fri Nov 25 01:54:28 2011 +0000 Test case for #5643 >--------------------------------------------------------------- tests/typecheck/should_compile/T5643.hs | 22 ++++++++++++++++++++++ tests/typecheck/should_compile/all.T | 1 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/tests/typecheck/should_compile/T5643.hs b/tests/typecheck/should_compile/T5643.hs new file mode 100644 index 0000000..eeab686 --- /dev/null +++ b/tests/typecheck/should_compile/T5643.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE MultiParamTypeClasses + ,FunctionalDependencies + ,FlexibleContexts #-} + +module T5643 where + +import Prelude () + +class FoldableLL a b | a -> b + +class FoldableLL full item => ListLike full item | full -> item where + + cons :: item -> full -> full + head :: full -> item + tail :: full -> full + + init :: full -> full + init l = cons (head l) (init xs) + where xs = tail l + +-- Deriveds from the functional dependencies were escaping in the Wanted +-- constraints and emitWantedCts was giving a panic error. diff --git a/tests/typecheck/should_compile/all.T b/tests/typecheck/should_compile/all.T index d744fd0..5d62df9 100644 --- a/tests/typecheck/should_compile/all.T +++ b/tests/typecheck/should_compile/all.T @@ -366,4 +366,5 @@ test('T5490', normal, compile, ['']) test('T5514', normal, compile, ['']) test('T5581', normal, compile, ['']) test('T5655', normal, compile, ['']) +test('T5643', normal, compile, ['']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
