Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
haddock
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Rinat Striungis
haddock
Commits
f9f38d45
Commit
f9f38d45
authored
18 years ago
by
David Waern
Browse files
Options
Downloads
Patches
Plain Diff
Simplify createInterfaces
parent
e185f5ae
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Haddock/Interface.hs
+9
-10
9 additions, 10 deletions
src/Haddock/Interface.hs
with
9 additions
and
10 deletions
src/Haddock/Interface.hs
+
9
−
10
View file @
f9f38d45
...
...
@@ -34,16 +34,23 @@ import Name
-- return the home link environment created in the process, and any error
-- messages.
createInterfaces
::
[
GhcModule
]
->
LinkEnv
->
[
Flag
]
->
([
Interface
],
LinkEnv
,
[
ErrMsg
])
createInterfaces
modules
extLinks
flags
=
(
interfaces
,
homeLinks
,
messages
)
createInterfaces
modules
ext
ernal
Links
flags
=
(
interfaces
,
homeLinks
,
messages
)
where
((
interfaces
,
homeLinks
),
messages
)
=
runWriter
$
do
-- part 1, create the interfaces
interfaces
<-
createInterfaces'
modules
flags
-- part 2, attach the instances
let
interfaces'
=
attachInstances
interfaces
-- part 3, rename the interfaces
renameInterfaces
interfaces'
extLinks
let
homeLinks
=
buildHomeLinks
interfaces
let
links
=
homeLinks
`
Map
.
union
`
externalLinks
interfaces''
<-
mapM
(
renameInterface
links
)
interfaces'
return
(
interfaces''
,
homeLinks
)
createInterfaces'
::
[
GhcModule
]
->
[
Flag
]
->
ErrMsgM
[
Interface
]
createInterfaces'
modules
flags
=
do
...
...
@@ -56,14 +63,6 @@ createInterfaces' modules flags = do
return
$
Map
.
insert
(
ifaceMod
interface
)
interface
map
renameInterfaces
::
[
Interface
]
->
LinkEnv
->
ErrMsgM
([
Interface
],
LinkEnv
)
renameInterfaces
interfaces
externalLinks
=
do
let
homeLinks
=
buildHomeLinks
interfaces
let
links
=
homeLinks
`
Map
.
union
`
externalLinks
interfaces'
<-
mapM
(
renameInterface
links
)
interfaces
return
(
interfaces'
,
homeLinks
)
-- | Build a mapping which for each original name, points to the "best"
-- place to link to in the documentation. For the definition of
-- "best", we use "the module nearest the bottom of the dependency
...
...
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