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
Stephen Judkins
haddock
Commits
4e6f4447
Commit
4e6f4447
authored
8 years ago
by
Edward Z. Yang
Committed by
Ben Gamari
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Documentation.
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
(cherry picked from commit
0671abfe
)
parent
fbbe544c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
haddock-api/src/Haddock/Interface/Create.hs
+22
-5
22 additions, 5 deletions
haddock-api/src/Haddock/Interface/Create.hs
with
22 additions
and
5 deletions
haddock-api/src/Haddock/Interface/Create.hs
+
22
−
5
View file @
4e6f4447
...
...
@@ -11,6 +11,10 @@
-- Maintainer : haddock@projects.haskell.org
-- Stability : experimental
-- Portability : portable
--
-- This module provides a single function 'createInterface',
-- which creates a Haddock 'Interface' from the typechecking
-- results 'TypecheckedModule' from GHC.
-----------------------------------------------------------------------------
module
Haddock.Interface.Create
(
createInterface
)
where
...
...
@@ -54,7 +58,11 @@ import HsDecls ( getConDetails )
-- | Use a 'TypecheckedModule' to produce an 'Interface'.
-- To do this, we need access to already processed modules in the topological
-- sort. That's what's in the 'IfaceMap'.
createInterface
::
TypecheckedModule
->
[
Flag
]
->
IfaceMap
->
InstIfaceMap
->
ErrMsgGhc
Interface
createInterface
::
TypecheckedModule
->
[
Flag
]
-- Boolean flags
->
IfaceMap
-- Locally processed modules
->
InstIfaceMap
-- External, already installed interfaces
->
ErrMsgGhc
Interface
createInterface
tm
flags
modMap
instIfaceMap
=
do
let
ms
=
pm_mod_summary
.
tm_parsed_module
$
tm
...
...
@@ -518,7 +526,7 @@ mkExportItems
->
WarningMap
->
GlobalRdrEnv
->
[
Name
]
-- exported names (orig)
->
[
LHsDecl
Name
]
->
[
LHsDecl
Name
]
-- renamed source declarations
->
Maps
->
FixMap
->
[
SrcSpan
]
-- splice locations
...
...
@@ -716,7 +724,7 @@ moduleExports :: Module -- ^ Module A (identity, NOT semantic)
->
WarningMap
->
GlobalRdrEnv
-- ^ The renaming environment used for A
->
[
Name
]
-- ^ All the exports of A
->
[
LHsDecl
Name
]
-- ^ All the declarations in A
->
[
LHsDecl
Name
]
-- ^ All the
renamed
declarations in A
->
IfaceMap
-- ^ Already created interfaces
->
InstIfaceMap
-- ^ Interfaces in other packages
->
Maps
...
...
@@ -765,8 +773,17 @@ moduleExports thisMod expMod dflags warnings gre _exports decls ifaceMap instIfa
-- (For more information, see Trac #69)
fullModuleContents
::
DynFlags
->
WarningMap
->
GlobalRdrEnv
->
Maps
->
FixMap
->
[
SrcSpan
]
->
[
LHsDecl
Name
]
->
ErrMsgGhc
[
ExportItem
Name
]
-- | Simplified variant of 'mkExportItems', where we can assume that
-- every locally defined declaration is exported; thus, we just
-- zip through the renamed declarations.
fullModuleContents
::
DynFlags
->
WarningMap
->
GlobalRdrEnv
-- ^ The renaming environment
->
Maps
->
FixMap
->
[
SrcSpan
]
-- ^ Locations of all TH splices
->
[
LHsDecl
Name
]
-- ^ All the renamed declarations
->
ErrMsgGhc
[
ExportItem
Name
]
fullModuleContents
dflags
warnings
gre
(
docMap
,
argMap
,
subMap
,
declMap
,
instMap
)
fixMap
splices
decls
=
liftM
catMaybes
$
mapM
mkExportItem
(
expandSig
decls
)
where
...
...
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