aboutsummaryrefslogtreecommitdiff
path: root/html-test/src
diff options
context:
space:
mode:
Diffstat (limited to 'html-test/src')
-rw-r--r--html-test/src/Bug1035.hs9
-rw-r--r--html-test/src/Bug865.hs9
-rw-r--r--html-test/src/Bug923.hs11
-rw-r--r--html-test/src/Identifiers.hs35
-rw-r--r--html-test/src/NamespacedIdentifiers.hs13
-rw-r--r--html-test/src/UnboxedStuff.hs18
6 files changed, 95 insertions, 0 deletions
diff --git a/html-test/src/Bug1035.hs b/html-test/src/Bug1035.hs
new file mode 100644
index 00000000..3516c08f
--- /dev/null
+++ b/html-test/src/Bug1035.hs
@@ -0,0 +1,9 @@
+module Bug1035 where
+
+data Foo = Bar
+
+data Bar = Foo
+
+-- | A link to 'Bar'
+foo :: ()
+foo = ()
diff --git a/html-test/src/Bug865.hs b/html-test/src/Bug865.hs
new file mode 100644
index 00000000..71a6add1
--- /dev/null
+++ b/html-test/src/Bug865.hs
@@ -0,0 +1,9 @@
+module Bug865 where
+
+-- | An emphasized link [yes /this/ is emphasized while this is
+-- @monospaced@](https://www.haskell.org/). And here is an image:
+--
+-- ![/emphasis/ stripped](https://www.haskell.org/static/img/haskell-logo.svg)
+--
+link :: ()
+link = ()
diff --git a/html-test/src/Bug923.hs b/html-test/src/Bug923.hs
new file mode 100644
index 00000000..bb5bca0a
--- /dev/null
+++ b/html-test/src/Bug923.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE KindSignatures, FlexibleInstances, GADTs, DataKinds #-}
+module Bug923 where
+
+-- | A promoted tuple type
+data T :: (* -> (*,*)) -> * where
+ T :: a -> T ('(,) a)
+
+-- | A promoted tuple type in an instance
+instance Eq a => Eq (T ('(,) a)) where
+ T x == T y = x == y
+
diff --git a/html-test/src/Identifiers.hs b/html-test/src/Identifiers.hs
new file mode 100644
index 00000000..75f12109
--- /dev/null
+++ b/html-test/src/Identifiers.hs
@@ -0,0 +1,35 @@
+{-# LANGUAGE TypeOperators #-}
+module Identifiers where
+
+import Data.List (elem, (++))
+
+data Id = Id
+data a :* b = a :* b
+
+{-|
+
+ * Unadorned:
+
+ - Unqualified: '++', 'elem'
+ - Qualified: 'Data.List.++', 'Data.Lis.elem'
+ - Namespaced: v'++', t'++', v'elem', t'elem', v'Id', t'Id', v':*', t':*'
+
+ * Parenthesized:
+
+ - Unqualified: @'(++)' [1,2,3] [4,5,6]@
+ - Qualified: @'(Data.List.++)' [1,2,3] [4,5,6]@
+ - Namespaced: v'(++)', t'++', v'(:*)', t'(:*)'
+
+ * Backticked:
+
+ - Unqualified: @1 '`elem`' [-3..3]@
+ - Qualified: @1 '`Data.List.elem`' [-3..3]@
+ - Namespaced: v'`elem`', t'`elem`', v'`Id`', t'`Id`'
+
+ * Edge cases:
+
+ - Tuples: '()', '(,,,)'
+
+-}
+foo :: ()
+foo = ()
diff --git a/html-test/src/NamespacedIdentifiers.hs b/html-test/src/NamespacedIdentifiers.hs
new file mode 100644
index 00000000..6f59d247
--- /dev/null
+++ b/html-test/src/NamespacedIdentifiers.hs
@@ -0,0 +1,13 @@
+module NamespacedIdentifiers where
+
+-- | A link to:
+--
+-- * the type t'Bar'
+-- * the constructor v'Bar'
+-- * the unimported but qualified type t'A.A'
+-- * the unimported but qualified value v'A.A'
+--
+data Foo = Bar
+
+-- | A link to the value v'Foo' (which shouldn't exist).
+data Bar
diff --git a/html-test/src/UnboxedStuff.hs b/html-test/src/UnboxedStuff.hs
new file mode 100644
index 00000000..bd1b1302
--- /dev/null
+++ b/html-test/src/UnboxedStuff.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE UnboxedSums, UnboxedTuples #-}
+module UnboxedStuff where
+
+data X
+data Y
+data Z
+
+-- * Unboxed type constructors
+
+unboxedUnit :: (# #) -> (# #)
+unboxedUnit = undefined
+
+unboxedTuple :: (# X, Y #) -> (# X, Y, Z #)
+unboxedTuple = undefined
+
+unboxedSum :: (# X | Y #) -> (# X | Y | Z #)
+unboxedSum = undefined
+