aboutsummaryrefslogtreecommitdiff
path: root/hoogle-test/src
diff options
context:
space:
mode:
Diffstat (limited to 'hoogle-test/src')
-rw-r--r--hoogle-test/src/assoc-types/AssocTypes.hs23
-rw-r--r--hoogle-test/src/classes/Classes.hs16
-rw-r--r--hoogle-test/src/fixity/Fixity.hs12
-rw-r--r--hoogle-test/src/modules/Bar.hs12
-rw-r--r--hoogle-test/src/modules/Foo.hs9
5 files changed, 72 insertions, 0 deletions
diff --git a/hoogle-test/src/assoc-types/AssocTypes.hs b/hoogle-test/src/assoc-types/AssocTypes.hs
new file mode 100644
index 00000000..a9bdc6d8
--- /dev/null
+++ b/hoogle-test/src/assoc-types/AssocTypes.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE TypeFamilies #-}
+
+
+module AssocTypes where
+
+
+class Foo a where
+
+ type Bar a b
+ type Baz a
+
+ type Baz a = [(a, a)]
+
+ bar :: Bar a a
+ bar = undefined
+
+
+instance Foo [a] where
+
+ type Bar [a] Int = [(a, Bool)]
+ type Bar [a] Bool = [(Int, a)]
+
+ type Baz [a] = (a, a, a)
diff --git a/hoogle-test/src/classes/Classes.hs b/hoogle-test/src/classes/Classes.hs
new file mode 100644
index 00000000..23f68499
--- /dev/null
+++ b/hoogle-test/src/classes/Classes.hs
@@ -0,0 +1,16 @@
+module Classes where
+
+
+class Foo f where
+
+ bar :: f a -> f b -> f (a, b)
+ baz :: f ()
+
+ baz = undefined
+
+
+class Quux q where
+
+ (+++), (///) :: q -> q -> q
+ (***), logBase :: q -> q -> q
+ foo, quux :: q -> q -> q
diff --git a/hoogle-test/src/fixity/Fixity.hs b/hoogle-test/src/fixity/Fixity.hs
new file mode 100644
index 00000000..3af38117
--- /dev/null
+++ b/hoogle-test/src/fixity/Fixity.hs
@@ -0,0 +1,12 @@
+module Fixity where
+
+
+(+++), (***), (///) :: a -> a -> a
+(+++) = undefined
+(***) = undefined
+(///) = undefined
+
+
+infix 6 +++
+infixl 7 ***
+infixr 8 ///
diff --git a/hoogle-test/src/modules/Bar.hs b/hoogle-test/src/modules/Bar.hs
new file mode 100644
index 00000000..156a835f
--- /dev/null
+++ b/hoogle-test/src/modules/Bar.hs
@@ -0,0 +1,12 @@
+module Bar where
+
+
+import Foo
+
+
+bar :: Int -> Int
+bar x = foo' x x
+
+
+bar' :: Int -> Int -> Int
+bar' x y = foo' (bar (foo x)) (bar (foo y))
diff --git a/hoogle-test/src/modules/Foo.hs b/hoogle-test/src/modules/Foo.hs
new file mode 100644
index 00000000..6581fe4c
--- /dev/null
+++ b/hoogle-test/src/modules/Foo.hs
@@ -0,0 +1,9 @@
+module Foo where
+
+
+foo :: Int -> Int
+foo = (* 2)
+
+
+foo' :: Int -> Int -> Int
+foo' x y = foo x + foo y