Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
862b6d06
Commit
862b6d06
authored
Jul 27, 2013
by
ian@well-typed.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use OrdLists when parsing export lists
No functional changes
parent
cf8fba95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
compiler/parser/Parser.y.pp
compiler/parser/Parser.y.pp
+19
-19
No files found.
compiler/parser/Parser.y.pp
View file @
862b6d06
...
...
@@ -469,34 +469,34 @@ header_body2 :: { [LImportDecl RdrName] }
--
The
Export
List
maybeexports
::
{
Maybe
[
LIE
RdrName
]
}
:
'('
exportlist
')'
{
Just
$2
}
:
'('
exportlist
')'
{
Just
(
fromOL
$2
)
}
|
{
-
empty
-
}
{
Nothing
}
exportlist
::
{
[
LIE
RdrName
]
}
:
expdoclist
','
expdoclist
{
$1
++
$3
}
exportlist
::
{
OrdList
(
LIE
RdrName
)
}
:
expdoclist
','
expdoclist
{
$1
`
appOL
`
$3
}
|
exportlist1
{
$1
}
exportlist1
::
{
[
LIE
RdrName
]
}
:
expdoclist
export
expdoclist
','
exportlist1
{
$1
++
(
$2
:
$3
)
++
$5
}
|
expdoclist
export
expdoclist
{
$1
++
(
$2
:
$3
)
}
exportlist1
::
{
OrdList
(
LIE
RdrName
)
}
:
expdoclist
export
expdoclist
','
exportlist1
{
$1
`
appOL
`
$2
`
appOL
`
$3
`
appOL
`
$5
}
|
expdoclist
export
expdoclist
{
$1
`
appOL
`
$2
`
appOL
`
$3
}
|
expdoclist
{
$1
}
expdoclist
::
{
[
LIE
RdrName
]
}
:
exp_doc
expdoclist
{
$1
:
$2
}
|
{
-
empty
-
}
{
[]
}
expdoclist
::
{
OrdList
(
LIE
RdrName
)
}
:
exp_doc
expdoclist
{
$1
`
appOL
`
$2
}
|
{
-
empty
-
}
{
nilOL
}
exp_doc
::
{
LIE
RdrName
}
:
docsection
{
L1
(
case
(
unLoc
$1
)
of
(
n
,
doc
)
->
IEGroup
n
doc
)
}
|
docnamed
{
L1
(
IEDocNamed
((
fst
.
unLoc
)
$1
))
}
|
docnext
{
L1
(
IEDoc
(
unLoc
$1
))
}
exp_doc
::
{
OrdList
(
LIE
RdrName
)
}
:
docsection
{
unitOL
(
L1
(
case
(
unLoc
$1
)
of
(
n
,
doc
)
->
IEGroup
n
doc
)
)
}
|
docnamed
{
unitOL
(
L1
(
IEDocNamed
((
fst
.
unLoc
)
$1
)))
}
|
docnext
{
unitOL
(
L1
(
IEDoc
(
unLoc
$1
)))
}
--
No
longer
allow
things
like
[]
and
(,,,)
to
be
exported
--
They
are
built
in
syntax
,
always
available
export
::
{
LIE
RdrName
}
:
qcname_ext
export_subspec
{
LL
(
mkModuleImpExp
(
unLoc
$1
)
(
unLoc
$2
))
}
|
'module'
modid
{
LL
(
IEModuleContents
(
unLoc
$2
))
}
export
::
{
OrdList
(
LIE
RdrName
)
}
:
qcname_ext
export_subspec
{
unitOL
(
LL
(
mkModuleImpExp
(
unLoc
$1
)
(
unLoc
$2
)
))
}
|
'module'
modid
{
unitOL
(
LL
(
IEModuleContents
(
unLoc
$2
)
))
}
export_subspec
::
{
Located
ImpExpSubSpec
}
:
{
-
empty
-
}
{
L0
ImpExpAbs
}
...
...
@@ -563,8 +563,8 @@ maybeimpspec :: { Located (Maybe (Bool, [LIE RdrName])) }
|
{
-
empty
-
}
{
noLoc
Nothing
}
impspec
::
{
Located
(
Bool
,
[
LIE
RdrName
])
}
:
'('
exportlist
')'
{
LL
(
False
,
$2
)
}
|
'hiding'
'('
exportlist
')'
{
LL
(
True
,
$3
)
}
:
'('
exportlist
')'
{
LL
(
False
,
fromOL
$2
)
}
|
'hiding'
'('
exportlist
')'
{
LL
(
True
,
fromOL
$3
)
}
-----------------------------------------------------------------------------
--
Fixity
Declarations
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment