Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/700f295843c635fddeb693c7ee4c9c7ccd94aae1 >--------------------------------------------------------------- commit 700f295843c635fddeb693c7ee4c9c7ccd94aae1 Author: Jose Pedro Magalhaes <[email protected]> Date: Mon Nov 28 09:02:05 2011 +0000 Another PolyKinds test >--------------------------------------------------------------- tests/polykinds/PolyKinds13.hs | 26 ++++++++++++++++++++++++++ tests/polykinds/all.T | 1 + 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/tests/polykinds/PolyKinds13.hs b/tests/polykinds/PolyKinds13.hs new file mode 100644 index 0000000..315c62a --- /dev/null +++ b/tests/polykinds/PolyKinds13.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE FlexibleInstances #-} + +module PolyKinds13 where + + +data Proxy a = Proxy + +instance Show (Proxy a) where + show _ = "Proxy" + +instance Functor Proxy where + fmap _ Proxy = Proxy + + +data TypeRep = TypeRep + +class MyTypeable t where + myTypeOf :: Proxy t -> TypeRep + myTypeOf _ = TypeRep + +data Apply f t = Apply (f t) + +instance MyTypeable Apply +instance MyTypeable Int +instance MyTypeable Maybe diff --git a/tests/polykinds/all.T b/tests/polykinds/all.T index 8b7be52..2604925 100644 --- a/tests/polykinds/all.T +++ b/tests/polykinds/all.T @@ -8,6 +8,7 @@ test('PolyKinds03', normal, compile, ['']) test('PolyKinds05', normal, compile, ['']) test('PolyKinds08', normal, compile, ['']) test('PolyKinds11', normal, compile, ['']) +test('PolyKinds13', normal, compile, ['']) test('PolyKinds02', normal, compile_fail, ['']) test('PolyKinds04', normal, compile_fail, ['']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
