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
Model registry
Operate
Environments
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Glasgow Haskell Compiler
haddock
Commits
9bede936
Commit
9bede936
authored
2 years ago
by
Vladislav Zavialov
Browse files
Options
Downloads
Patches
Plain Diff
Class layout info
parent
57b7493b
Branches
wip/class-layout-info
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!38
Make --no-tmp-comp-dir the default
,
!37
Adapt to latest xhtml version, various optimizations
,
!31
Support HsToken in DataDecl and ClassDecl
,
!16
Class layout info
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
haddock-api/src/Haddock/Convert.hs
+1
-0
1 addition, 0 deletions
haddock-api/src/Haddock/Convert.hs
haddock-api/src/Haddock/Interface/Rename.hs
+11
-3
11 additions, 3 deletions
haddock-api/src/Haddock/Interface/Rename.hs
with
12 additions
and
3 deletions
haddock-api/src/Haddock/Convert.hs
+
1
−
0
View file @
9bede936
...
...
@@ -128,6 +128,7 @@ tyThingToLHsDecl prr t = case t of
in
withErrs
(
lefts
atTyClDecls
)
.
TyClD
noExtField
$
ClassDecl
{
tcdCtxt
=
Just
$
synifyCtx
(
classSCTheta
cl
)
,
tcdLayout
=
NoLayoutInfo
,
tcdLName
=
synifyNameN
cl
,
tcdTyVars
=
synifyTyVars
vs
,
tcdFixity
=
synifyFixity
cl
...
...
This diff is collapsed.
Click to expand it.
haddock-api/src/Haddock/Interface/Rename.hs
+
11
−
3
View file @
9bede936
...
...
@@ -428,7 +428,8 @@ renameTyClD d = case d of
return
(
DataDecl
{
tcdDExt
=
noExtField
,
tcdLName
=
lname'
,
tcdTyVars
=
tyvars'
,
tcdFixity
=
fixity
,
tcdDataDefn
=
defn'
})
ClassDecl
{
tcdCtxt
=
lcontext
,
tcdLName
=
lname
,
tcdTyVars
=
ltyvars
,
tcdFixity
=
fixity
ClassDecl
{
tcdLayout
=
layout
,
tcdCtxt
=
lcontext
,
tcdLName
=
lname
,
tcdTyVars
=
ltyvars
,
tcdFixity
=
fixity
,
tcdFDs
=
lfundeps
,
tcdSigs
=
lsigs
,
tcdATs
=
ats
,
tcdATDefs
=
at_defs
}
->
do
lcontext'
<-
traverse
renameLContext
lcontext
lname'
<-
renameL
lname
...
...
@@ -438,10 +439,12 @@ renameTyClD d = case d of
ats'
<-
mapM
(
renameLThing
renameFamilyDecl
)
ats
at_defs'
<-
mapM
(
mapM
renameTyFamDefltD
)
at_defs
-- we don't need the default methods or the already collected doc entities
return
(
ClassDecl
{
tcdCtxt
=
lcontext'
,
tcdLName
=
lname'
,
tcdTyVars
=
ltyvars'
return
(
ClassDecl
{
tcdCExt
=
noExtField
,
tcdLayout
=
renameLayoutInfo
layout
,
tcdCtxt
=
lcontext'
,
tcdLName
=
lname'
,
tcdTyVars
=
ltyvars'
,
tcdFixity
=
fixity
,
tcdFDs
=
lfundeps'
,
tcdSigs
=
lsigs'
,
tcdMeths
=
emptyBag
,
tcdATs
=
ats'
,
tcdATDefs
=
at_defs'
,
tcdDocs
=
[]
,
tcdCExt
=
noExtField
})
,
tcdATs
=
ats'
,
tcdATDefs
=
at_defs'
,
tcdDocs
=
[]
})
where
renameLFunDep
::
LHsFunDep
GhcRn
->
RnM
(
LHsFunDep
DocNameI
)
...
...
@@ -452,6 +455,11 @@ renameTyClD d = case d of
renameLSig
(
L
loc
sig
)
=
return
.
L
(
locA
loc
)
=<<
renameSig
sig
renameLayoutInfo
::
LayoutInfo
GhcRn
->
LayoutInfo
DocNameI
renameLayoutInfo
(
ExplicitBraces
ob
cb
)
=
ExplicitBraces
ob
cb
renameLayoutInfo
(
VirtualBraces
n
)
=
VirtualBraces
n
renameLayoutInfo
NoLayoutInfo
=
NoLayoutInfo
renameFamilyDecl
::
FamilyDecl
GhcRn
->
RnM
(
FamilyDecl
DocNameI
)
renameFamilyDecl
(
FamilyDecl
{
fdInfo
=
info
,
fdLName
=
lname
,
fdTyVars
=
ltyvars
...
...
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