Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a878e51a9eabb23745165683d2e87b1a9657bc2e

>---------------------------------------------------------------

commit a878e51a9eabb23745165683d2e87b1a9657bc2e
Author: Max Bolingbroke <[email protected]>
Date:   Mon Sep 26 10:14:31 2011 +0100

    Add test that caused <<loop>> before fix to associated type defaults

>---------------------------------------------------------------

 tests/typecheck/should_compile/all.T    |    1 +
 tests/typecheck/should_compile/tc258.hs |   13 +++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_compile/all.T 
b/tests/typecheck/should_compile/all.T
index 1f79803..7621490 100644
--- a/tests/typecheck/should_compile/all.T
+++ b/tests/typecheck/should_compile/all.T
@@ -349,6 +349,7 @@ test('tc254', normal, compile, [''])
 test('tc255', normal, compile, [''])
 test('tc256', normal, compile, [''])
 test('tc257', normal, compile, [''])
+test('tc258', normal, compile, [''])
 
 test('GivenOverlapping', normal, compile, [''])
 test('SilentParametersOverlapping', normal, compile, [''])
diff --git a/tests/typecheck/should_compile/tc258.hs 
b/tests/typecheck/should_compile/tc258.hs
new file mode 100644
index 0000000..00f030d
--- /dev/null
+++ b/tests/typecheck/should_compile/tc258.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE ConstraintKinds, TypeFamilies, UndecidableInstances #-}
+
+module AltPrelude where
+
+class MyFunctor f where
+       type FunctorCtxt f a :: Constraint
+       type FunctorCtxt f a = ()
+       (<$>) :: (FunctorCtxt f a, FunctorCtxt f b) => (a -> b) -> f a -> f b
+
+class MyFunctor ap => MyApplicative ap where
+       type ApplicativeCtxt ap a :: Constraint
+       type ApplicativeCtxt ap a = FunctorCtxt ap a
+       (<*>) :: (ApplicativeCtxt ap a, ApplicativeCtxt ap b) => ap (a -> b) -> 
ap a -> ap b



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to