aboutsummaryrefslogtreecommitdiff
path: root/html-test/src
diff options
context:
space:
mode:
Diffstat (limited to 'html-test/src')
-rw-r--r--html-test/src/Operators.hs6
-rw-r--r--html-test/src/OrphanInstances.hs8
-rw-r--r--html-test/src/OrphanInstancesClass.hs4
-rw-r--r--html-test/src/OrphanInstancesType.hs3
4 files changed, 20 insertions, 1 deletions
diff --git a/html-test/src/Operators.hs b/html-test/src/Operators.hs
index f7b4d0ab..0b633c3f 100644
--- a/html-test/src/Operators.hs
+++ b/html-test/src/Operators.hs
@@ -1,4 +1,6 @@
{-# LANGUAGE PatternSynonyms, TypeOperators, TypeFamilies, MultiParamTypeClasses, GADTs #-}
+{-# LANGUAGE FunctionalDependencies #-}
+
-- | Test operators with or without fixity declarations
module Operators where
@@ -42,7 +44,9 @@ data family a ** b
infix 9 **
-- | Class with fixity, including associated types
-class a ><> b where
+class a ><> b | a -> b where
+ -- Dec 2015: Added @a -> b@ functional dependency to clean up ambiguity
+ -- See GHC #11264
type a <>< b :: *
data a ><< b
(>><), (<<>) :: a -> b -> ()
diff --git a/html-test/src/OrphanInstances.hs b/html-test/src/OrphanInstances.hs
new file mode 100644
index 00000000..e50327ee
--- /dev/null
+++ b/html-test/src/OrphanInstances.hs
@@ -0,0 +1,8 @@
+module OrphanInstances where
+
+import OrphanInstancesType
+import OrphanInstancesClass
+
+-- | This is an orphan instance.
+instance AClass AType where
+ aClass (AType n) = n
diff --git a/html-test/src/OrphanInstancesClass.hs b/html-test/src/OrphanInstancesClass.hs
new file mode 100644
index 00000000..4b51acfc
--- /dev/null
+++ b/html-test/src/OrphanInstancesClass.hs
@@ -0,0 +1,4 @@
+module OrphanInstancesClass (AClass(..)) where
+
+class AClass a where
+ aClass :: a -> Int
diff --git a/html-test/src/OrphanInstancesType.hs b/html-test/src/OrphanInstancesType.hs
new file mode 100644
index 00000000..b3c3145e
--- /dev/null
+++ b/html-test/src/OrphanInstancesType.hs
@@ -0,0 +1,3 @@
+module OrphanInstancesType (AType(..)) where
+
+data AType = AType Int