Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
haddock
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo von Holtz
haddock
Commits
bf14dddd
Commit
bf14dddd
authored
22 years ago
by
simonmar
Browse files
Options
Downloads
Patches
Plain Diff
[haddock @ 2002-05-09 13:36:11 by simonmar]
Test existential types, amongst other things
parent
29b0d7d2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/Foo.hs
+49
-23
49 additions, 23 deletions
examples/Foo.hs
with
49 additions
and
23 deletions
examples/Foo.hs
+
49
−
23
View file @
bf14dddd
...
...
@@ -43,6 +43,8 @@ module Foo (
-- $aux4
-- $aux5
-- | This is some inline documentation in the export list
--
-- > a code block using bird-tracks
...
...
@@ -54,6 +56,11 @@ module Foo (
-- * A visible module
module
Visible
,
{-| nested-style doc comments -}
-- * Existential / Universal types
Ex
(
..
),
)
where
...
...
@@ -125,26 +132,30 @@ data R =
-- ** This is a section header (level 2)
-- *** This is a section header (level 3)
-- | In a comment string we can refer to identifiers in scope with
-- single quotes like this: 'T', and we can refer to modules by
-- using double quotes: "Foo". We can add emphasis /like this/.
--
-- * This is a bulleted list
--
-- - This is the next item (different kind of bullet)
--
-- (1) This is an ordered list
--
-- 2. This is the next item (different kind of bullet)
--
-- [
-- This is a block of code, which can include other markup: 'R'
-- formatting
-- is
-- significant
-- ]
--
-- We can also include URLs in documentation: <http://www.haskell.org/>.
{-|
In a comment string we can refer to identifiers in scope with
single quotes like this: 'T', and we can refer to modules by
using double quotes: "Foo". We can add emphasis /like this/.
* This is a bulleted list
- This is the next item (different kind of bullet)
(1) This is an ordered list
2. This is the next item (different kind of bullet)
@
This is a block of code, which can include other markup: 'R'
formatting
is
significant
@
> this is another block of code
We can also include URLs in documentation: <http://www.haskell.org/>.
-}
f
::
C
a
=>
Int
->
Int
...
...
@@ -161,13 +172,28 @@ h = 42
-- rather than a source declaration. The documentation may be
-- referred to in the export list using its name.
--
--
[
code block in named doc
]
--
@
code block in named doc
@
-- $aux2 This is some documentation that is attached to a name ($aux2)
-- $aux3
--
[
code block on its own in named doc
]
--
@
code block on its own in named doc
@
-- $aux4
--
-- [ code block on its own in named doc (after newline) ]
-- @ code block on its own in named doc (after newline) @
{- $aux5 a nested, named doc comment
with a paragraph,
@ and a code block @
-}
-- | A data-type using existential/universal types
data
Ex
a
=
forall
b
.
C
b
=>
Ex1
b
|
forall
b
.
Ex2
b
|
C
a
=>
Ex3
b
|
Ex4
(
forall
a
.
a
->
a
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment