aboutsummaryrefslogtreecommitdiff
path: root/html-test/src
diff options
context:
space:
mode:
authoralexbiehl-gc <72160047+alexbiehl-gc@users.noreply.github.com>2021-02-07 18:14:46 +0100
committerGitHub <noreply@github.com>2021-02-07 18:14:46 +0100
commit0f7ff041fb824653a7930e1292b81f34df1e967d (patch)
tree3e7f15ac3b0abe417797ec89275aa1209f6ca297 /html-test/src
parent9f597b6647a53624eaf501a34bfb4d8d15425929 (diff)
parent010f0320dff64e3f86091ba4691bc69ce6999647 (diff)
Merge pull request #1317 from bgamari/wip/ghc-head-merge
Merge ghc-8.10 into ghc-head
Diffstat (limited to 'html-test/src')
-rw-r--r--html-test/src/Bug1004.hs3
-rw-r--r--html-test/src/Bug1033.hs11
-rw-r--r--html-test/src/Bug1035.hs9
-rw-r--r--html-test/src/Bug1050.hs11
-rw-r--r--html-test/src/Bug1054.hs5
-rw-r--r--html-test/src/Bug1063.hs9
-rw-r--r--html-test/src/Bug1067A.hs9
-rw-r--r--html-test/src/Bug1067B.hs4
-rw-r--r--html-test/src/Bug1103.hs24
-rw-r--r--html-test/src/Bug387.hs12
-rw-r--r--html-test/src/Bug466.hs9
-rw-r--r--html-test/src/Bug952.hs5
-rw-r--r--html-test/src/Bug975.hs15
-rw-r--r--html-test/src/DefaultAssociatedTypes.hs14
-rw-r--r--html-test/src/DefaultSignatures.hs19
-rw-r--r--html-test/src/Identifiers.hs35
-rw-r--r--html-test/src/IgnoreExports.hs5
-rw-r--r--html-test/src/NamespacedIdentifiers.hs13
-rw-r--r--html-test/src/SectionLabels.hs8
19 files changed, 207 insertions, 13 deletions
diff --git a/html-test/src/Bug1004.hs b/html-test/src/Bug1004.hs
new file mode 100644
index 00000000..d789e77f
--- /dev/null
+++ b/html-test/src/Bug1004.hs
@@ -0,0 +1,3 @@
+module Bug1004 (Product(..)) where
+
+import Data.Functor.Product
diff --git a/html-test/src/Bug1033.hs b/html-test/src/Bug1033.hs
new file mode 100644
index 00000000..fdf5a57e
--- /dev/null
+++ b/html-test/src/Bug1033.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE StandaloneDeriving #-}
+
+module Bug1033 where
+
+import GHC.Generics
+
+data Foo = Foo
+
+-- | This does some generic foos.
+deriving instance Generic Foo
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/Bug1050.hs b/html-test/src/Bug1050.hs
new file mode 100644
index 00000000..ea293e6e
--- /dev/null
+++ b/html-test/src/Bug1050.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE RankNTypes #-}
+module Bug1050 where
+
+import Data.Kind
+
+newtype T :: (forall k. k -> Type) -> (forall k. k -> Type) where
+ MkT :: forall (f :: forall k. k -> Type) k (a :: k). f a -> T f a
+
+mkT = MkT
diff --git a/html-test/src/Bug1054.hs b/html-test/src/Bug1054.hs
new file mode 100644
index 00000000..c699f1fb
--- /dev/null
+++ b/html-test/src/Bug1054.hs
@@ -0,0 +1,5 @@
+module Bug1054 where
+
+-- * Header with 'foo' link
+
+foo = ()
diff --git a/html-test/src/Bug1063.hs b/html-test/src/Bug1063.hs
new file mode 100644
index 00000000..c6d13a1f
--- /dev/null
+++ b/html-test/src/Bug1063.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE QuantifiedConstraints #-}
+{-# LANGUAGE UndecidableInstances #-}
+module Bug1063 where
+
+class (c => d) => Implies c d
+instance (c => d) => Implies c d
diff --git a/html-test/src/Bug1067A.hs b/html-test/src/Bug1067A.hs
new file mode 100644
index 00000000..57ab60b0
--- /dev/null
+++ b/html-test/src/Bug1067A.hs
@@ -0,0 +1,9 @@
+{-# language PatternSynonyms #-}
+module Bug1067A ( Foo(P) ) where
+
+-- | A foo
+data Foo = Foo
+
+-- | A pattern
+pattern P :: Foo
+pattern P = Foo
diff --git a/html-test/src/Bug1067B.hs b/html-test/src/Bug1067B.hs
new file mode 100644
index 00000000..f1a814df
--- /dev/null
+++ b/html-test/src/Bug1067B.hs
@@ -0,0 +1,4 @@
+{-# language PatternSynonyms #-}
+module Bug1067B ( pattern P ) where
+
+import Bug1067A
diff --git a/html-test/src/Bug1103.hs b/html-test/src/Bug1103.hs
new file mode 100644
index 00000000..1f387e62
--- /dev/null
+++ b/html-test/src/Bug1103.hs
@@ -0,0 +1,24 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+module Bug1103 where
+
+import Data.Kind
+
+data family Foo1 :: Type -> Type
+data instance Foo1 Bool = Foo1Bool
+data instance Foo1 (Maybe a)
+
+data family Foo2 :: k -> Type
+data instance Foo2 Bool = Foo2Bool
+data instance Foo2 (Maybe a)
+data instance Foo2 :: Char -> Type
+data instance Foo2 :: (Char -> Char) -> Type where
+
+data family Foo3 :: k
+data instance Foo3
+data instance Foo3 Bool = Foo3Bool
+data instance Foo3 (Maybe a)
+data instance Foo3 :: Char -> Type
+data instance Foo3 :: (Char -> Char) -> Type where
diff --git a/html-test/src/Bug387.hs b/html-test/src/Bug387.hs
deleted file mode 100644
index d9fed34e..00000000
--- a/html-test/src/Bug387.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-module Bug387
- ( -- * Section1#a:section1#
- test1
- -- * Section2#a:section2#
- , test2
- ) where
-
-test1 :: Int
-test1 = 223
-
-test2 :: Int
-test2 = 42
diff --git a/html-test/src/Bug466.hs b/html-test/src/Bug466.hs
new file mode 100644
index 00000000..ec7cde2c
--- /dev/null
+++ b/html-test/src/Bug466.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE DataKinds, TypeFamilies, StarIsType #-}
+module Bug466 where
+
+class Cl a where
+ type Fam a :: [*]
+
+data X = X
+instance Cl X where
+ type Fam X = '[Char]
diff --git a/html-test/src/Bug952.hs b/html-test/src/Bug952.hs
new file mode 100644
index 00000000..09b365e4
--- /dev/null
+++ b/html-test/src/Bug952.hs
@@ -0,0 +1,5 @@
+module Bug952 where
+
+-- | See 'case', 'of', '--' compared to 'Q.case', 'Q.of', 'Q.--'
+foo :: ()
+foo = ()
diff --git a/html-test/src/Bug975.hs b/html-test/src/Bug975.hs
new file mode 100644
index 00000000..97ebabda
--- /dev/null
+++ b/html-test/src/Bug975.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE ExplicitForAll #-}
+module Bug973 where
+
+showRead
+ :: forall a b. (Show a, Read b)
+ => a -- ^ this gets turned into a string...
+ -> b -- ^ ...from which this is read
+showRead = read . show
+
+-- | Same as 'showRead', but with type variable order flipped
+showRead'
+ :: forall b a. (Show a, Read b)
+ => a -- ^ this gets turned into a string...
+ -> b -- ^ ...from which this is read
+showRead' = read . show
diff --git a/html-test/src/DefaultAssociatedTypes.hs b/html-test/src/DefaultAssociatedTypes.hs
new file mode 100644
index 00000000..6ad197d3
--- /dev/null
+++ b/html-test/src/DefaultAssociatedTypes.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE DefaultSignatures, TypeFamilies #-}
+
+module DefaultAssociatedTypes where
+
+-- | Documentation for Foo.
+class Foo a where
+ -- | Documentation for bar and baz.
+ bar, baz :: a -> String
+
+ -- | Doc for Qux
+ type Qux a :: *
+
+ -- | Doc for default Qux
+ type Qux a = [a]
diff --git a/html-test/src/DefaultSignatures.hs b/html-test/src/DefaultSignatures.hs
new file mode 100644
index 00000000..52d68a96
--- /dev/null
+++ b/html-test/src/DefaultSignatures.hs
@@ -0,0 +1,19 @@
+{-# LANGUAGE DefaultSignatures #-}
+
+module DefaultSignatures where
+
+-- | Documentation for Foo.
+class Foo a where
+ -- | Documentation for bar and baz.
+ bar, baz :: a -> String
+
+ -- | Documentation for the default signature of bar.
+ default bar :: Show a => a -> String
+ bar = show
+
+ -- | Documentation for baz'.
+ baz' :: String -> a
+
+ -- | Documentation for the default signature of baz'.
+ default baz' :: Read a => String -> a
+ baz' = read
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/IgnoreExports.hs b/html-test/src/IgnoreExports.hs
index 0321ad02..edb7c4c1 100644
--- a/html-test/src/IgnoreExports.hs
+++ b/html-test/src/IgnoreExports.hs
@@ -1,5 +1,8 @@
{-# OPTIONS_HADDOCK ignore-exports #-}
-module IgnoreExports (foo) where
+module IgnoreExports (Foo, foo) where
+
+-- | documentation for Foo
+data Foo = Bar -- ^ Documentation for Bar
-- | documentation for foo
foo :: Int
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/SectionLabels.hs b/html-test/src/SectionLabels.hs
new file mode 100644
index 00000000..560bafa4
--- /dev/null
+++ b/html-test/src/SectionLabels.hs
@@ -0,0 +1,8 @@
+module SectionLabels
+ (
+ -- * Section heading#custom#
+ n
+ ) where
+
+n :: Int
+n = 3