From a314ebd0af69cc1f6c76bfd8242d88d47277fcda Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Mon, 20 Jul 2015 18:16:26 +0200 Subject: Add some test cases for type renamer. --- html-test/src/Instances.hs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/html-test/src/Instances.hs b/html-test/src/Instances.hs index d0d68dc3..8e237fe7 100644 --- a/html-test/src/Instances.hs +++ b/html-test/src/Instances.hs @@ -1,6 +1,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE ImpredicativeTypes #-} module Instances where @@ -34,3 +35,20 @@ instance Bar Maybe [a] instance Bar [] (a, a) instance Foo f => Bar (Either a) (f a) instance Foo ((,,) a b) => Bar ((,,) a b) (a, b, a) + + +class Baz a where + + baz :: a -> (forall a. a -> a) -> (b, forall c. c -> a) -> (b, c) + baz' :: b -> (forall b. b -> a) -> (forall b. b -> a) -> [(b, a)] + baz'' :: b -> (forall b. (forall b. b -> a) -> c) -> (forall c. c -> b) + + baz = undefined + baz' = undefined + baz'' = undefined + + +instance Baz (a -> b) +instance Baz [c] +instance Baz (a, b, c) +instance Baz (a, [b], b, a) -- cgit v1.2.3