aboutsummaryrefslogtreecommitdiff
path: root/html-test/src
diff options
context:
space:
mode:
Diffstat (limited to 'html-test/src')
-rw-r--r--html-test/src/Bug188.hs7
-rw-r--r--html-test/src/Bug26.hs29
-rw-r--r--html-test/src/Bug310.hs4
-rw-r--r--html-test/src/Bug313.hs37
-rw-r--r--html-test/src/Bug335.hs26
-rw-r--r--html-test/src/FunArgs.hs23
6 files changed, 118 insertions, 8 deletions
diff --git a/html-test/src/Bug188.hs b/html-test/src/Bug188.hs
deleted file mode 100644
index 15089699..00000000
--- a/html-test/src/Bug188.hs
+++ /dev/null
@@ -1,7 +0,0 @@
--- Tests that the listed order of functions grouped under a single
--- type signature is preserved as in-source. Before fixing #188, it
--- seems to have preserved the first function but reversed the rest.
-module Bug188 where
-
-class A a where
- f, g, h, i :: a -> ()
diff --git a/html-test/src/Bug26.hs b/html-test/src/Bug26.hs
new file mode 100644
index 00000000..b0483f03
--- /dev/null
+++ b/html-test/src/Bug26.hs
@@ -0,0 +1,29 @@
+-- | This module tests the ‘@since …’ annotation.
+--
+-- @since 1.2.3
+module Bug26 where
+
+-- | Foo
+--
+-- @since 2.10.7
+--
+-- @since 2.10.8
+f :: ()
+f = ()
+
+-- | Bar
+g :: ()
+g = ()
+
+-- | Class
+--
+-- @since 1.0
+class C a where
+ -- | @since 1.2.3
+ c_f :: a
+
+-- | instance for ()
+--
+-- @since 0.7.8
+instance C () where
+ c_f = ()
diff --git a/html-test/src/Bug310.hs b/html-test/src/Bug310.hs
new file mode 100644
index 00000000..d2492dc0
--- /dev/null
+++ b/html-test/src/Bug310.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE ExplicitNamespaces #-}
+module Bug310 ( type (+) ) where
+
+import GHC.TypeLits
diff --git a/html-test/src/Bug313.hs b/html-test/src/Bug313.hs
new file mode 100644
index 00000000..90d4d3b6
--- /dev/null
+++ b/html-test/src/Bug313.hs
@@ -0,0 +1,37 @@
+-- | The first list is incorrectly numbered as 1. 2. 1.; the second example
+-- renders fine (1. 2. 3.).
+--
+-- See https://github.com/haskell/haddock/issues/313
+module Bug313 where
+
+{- |
+Some text.
+
+1. Item 1
+
+2. Item 2
+
+ > Some code
+
+3. Item 3
+
+Some more text.
+-}
+a :: a
+a = undefined
+
+{- |
+Some text.
+
+1. Item 1
+
+2. Item 2
+
+ > Some code
+
+3. Item 3
+
+-}
+-- | Some more text.
+b :: a
+b = undefined
diff --git a/html-test/src/Bug335.hs b/html-test/src/Bug335.hs
new file mode 100644
index 00000000..c1821dd0
--- /dev/null
+++ b/html-test/src/Bug335.hs
@@ -0,0 +1,26 @@
+-- Tests for collapsable headers
+module Bug335 where
+
+{-|
+=== __ExF:__
+abc
+-}
+f :: ()
+f = ()
+
+{-|
+=== __ExG:__
+>>> a
+b
+
+>>> c
+d
+
+==== Under ex
+foo
+
+== Out of Ex
+foo
+-}
+g :: ()
+g = ()
diff --git a/html-test/src/FunArgs.hs b/html-test/src/FunArgs.hs
index cfde185d..24e1ccff 100644
--- a/html-test/src/FunArgs.hs
+++ b/html-test/src/FunArgs.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ExplicitForAll #-}
+{-# LANGUAGE RankNTypes, DataKinds, TypeFamilies #-}
module FunArgs where
f :: forall a. Ord a
@@ -15,3 +15,24 @@ g :: a -- ^ First argument
-> c -- ^ Third argument
-> d -- ^ Result
g = undefined
+
+
+h :: forall a b c
+ . a -- ^ First argument
+ -> b -- ^ Second argument
+ -> c -- ^ Third argument
+ -> forall d. d -- ^ Result
+h = undefined
+
+
+i :: forall a (b :: ()) d. (d ~ '())
+ => forall c
+ . a b c d -- ^ abcd
+ -> () -- ^ Result
+i = undefined
+
+
+j :: forall proxy (a :: ()) b
+ . proxy a -- ^ First argument
+ -> b -- ^ Result
+j = undefined