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
My Nguyen
haddock
Commits
7290bf9d
Commit
7290bf9d
authored
9 years ago
by
Ben Gamari
Browse files
Options
Downloads
Plain Diff
Merge pull request #507 from bgamari/T505
Fix #505
parents
6db811ae
6193f6d0
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
+12
-5
12 additions, 5 deletions
haddock-api/src/Haddock/Interface/Create.hs
with
12 additions
and
5 deletions
haddock-api/src/Haddock/Interface/Create.hs
+
12
−
5
View file @
7290bf9d
...
...
@@ -36,7 +36,6 @@ import Control.Arrow (second)
import
Control.DeepSeq
import
Control.Monad
import
Data.Function
(
on
)
import
qualified
Data.Foldable
as
F
import
qualified
Packages
import
qualified
Module
...
...
@@ -50,7 +49,7 @@ import TcRnTypes
import
FastString
(
concatFS
)
import
BasicTypes
(
StringLiteral
(
..
)
)
import
qualified
Outputable
as
O
import
HsDecls
(
gadtDeclDetails
,
getConDetails
)
import
HsDecls
(
getConDetails
)
-- | Use a 'TypecheckedModule' to produce an 'Interface'.
-- To do this, we need access to already processed modules in the topological
...
...
@@ -784,13 +783,21 @@ extractDecl name mdl decl
|
otherwise
=
case
unLoc
decl
of
TyClD
d
@
ClassDecl
{}
->
let
matches
=
[
sig
|
sig
<-
tcdSigs
d
,
name
`
elem
`
sigName
sig
,
isTypeLSig
sig
]
-- TODO: document fixity
let
matches
=
[
lsig
|
lsig
<-
tcdSigs
d
,
ClassOpSig
False
_
_
<-
pure
$
unLoc
lsig
-- Note: exclude `default` declarations (see #505)
,
name
`
elem
`
sigName
lsig
]
-- TODO: document fixity
in
case
matches
of
[
s0
]
->
let
(
n
,
tyvar_names
)
=
(
tcdName
d
,
tyClDeclTyVars
d
)
L
pos
sig
=
addClassContext
n
tyvar_names
s0
in
L
pos
(
SigD
sig
)
_
->
error
"internal: extractDecl (ClassDecl)"
_
->
O
.
pprPanic
"extractDecl"
(
O
.
text
"Ambiguous decl for"
O
.<+>
O
.
ppr
name
O
.<+>
O
.
text
"in class:"
O
.$$
O
.
nest
4
(
O
.
ppr
d
)
O
.$$
O
.
text
"Matches:"
O
.$$
O
.
nest
4
(
O
.
ppr
matches
))
TyClD
d
@
DataDecl
{}
->
let
(
n
,
tyvar_tys
)
=
(
tcdName
d
,
lHsQTyVarsToTypes
(
tyClDeclTyVars
d
))
in
SigD
<$>
extractRecSel
name
mdl
n
tyvar_tys
(
dd_cons
(
tcdDataDefn
d
))
...
...
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