blob: d87877040f330a0bdc334af30374475099b84175 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
\haddockmoduleheading{TypeFamilies3}
\label{module:TypeFamilies3}
\haddockbeginheader
{\haddockverb\begin{verbatim}
module TypeFamilies3 (
Foo, Bar, Baz(Baz3, Baz2, Baz1)
) where\end{verbatim}}
\haddockendheader
\begin{haddockdesc}
\item[\begin{tabular}{@{}l}
type family Foo a where
\end{tabular}]
{\haddockbegindoc
\haddockbeginargs
\haddockdecltt{Foo () = Int} \\
\haddockdecltt{Foo {\char '137} = ()} \\
\end{tabulary}\par
A closed type family\par}
\end{haddockdesc}
\begin{haddockdesc}
\item[\begin{tabular}{@{}l}
type family Bar a
\end{tabular}]
{\haddockbegindoc
An open family\par}
\end{haddockdesc}
\begin{haddockdesc}
\item[\begin{tabular}{@{}l}
type instance Bar Int = ()\\type instance Bar () = Int
\end{tabular}]
\end{haddockdesc}
\begin{haddockdesc}
\item[\begin{tabular}{@{}l}
data family Baz a
\end{tabular}]
{\haddockbegindoc
A data family\par}
\end{haddockdesc}
\begin{haddockdesc}
\item[\begin{tabular}{@{}l}
newtype instance Baz Double\\data instance Baz Int\\data instance Baz ()
\end{tabular}]
\end{haddockdesc}
|