aboutsummaryrefslogtreecommitdiff
path: root/html-test/src/Instances.hs
diff options
context:
space:
mode:
authorƁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-08-05 21:08:42 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-08-21 18:22:33 +0100
commit25ea9a3a8fab29490d0957f3b4e55e03458183d2 (patch)
tree98acef33f208d1dda1f706e68e3d010482b59669 /html-test/src/Instances.hs
parenta24cc753ab35af1b2abfb523a835624484cf71d1 (diff)
Add examples with type operators to the instances test case.
Diffstat (limited to 'html-test/src/Instances.hs')
-rw-r--r--html-test/src/Instances.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/html-test/src/Instances.hs b/html-test/src/Instances.hs
index b7bc8921..545c8534 100644
--- a/html-test/src/Instances.hs
+++ b/html-test/src/Instances.hs
@@ -3,11 +3,15 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeOperators #-}
module Instances where
+newtype (<~~) a b = Xyzzy (b -> (a, a))
+
+
class Foo f where
foo :: f Int -> a -> f a
@@ -21,6 +25,8 @@ instance Foo []
instance (Eq a, Foo f) => Foo ((,) (f a))
instance Foo (Either a)
instance Foo ((,,) a a)
+instance Foo ((->) a)
+instance Foo ((<~~) a)
class Foo f => Bar f a where