Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
5581ce52
Commit
5581ce52
authored
Apr 18, 2009
by
waern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix my previous patch about type parsing
I forgot to record some additional changes.
parent
ef70af35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
compiler/parser/Parser.y.pp
compiler/parser/Parser.y.pp
+0
-19
No files found.
compiler/parser/Parser.y.pp
View file @
5581ce52
...
...
@@ -1004,17 +1004,6 @@ strict_mark :: { Located HsBang }
:
'!'
{
L1
HsStrict
}
|
'{-# UNPACK'
'#-}'
'!'
{
LL
HsUnbox
}
----------------------
--
Notes
for
'ctype'
--
We
should
probably
use
'gentype'
rather
than
'type'
in
the
LHS
of
type
declarations
--
That
would
leave
the
only
use
of
'type'
in
'ctype'
;
and
only
one
of
its
occurrences
--
makes
sense
there
too
!
So
it
might
make
sense
to
inline
type
there
:
--
ctype
:
'forall'
tv_bndrs
'.'
ctype
--
|
context
'=>'
ctype
--
|
ipvar
'::'
gentype
--
|
gentype
--
Which
in
turn
would
let
us
rename
gentype
to
type
--
A
ctype
is
a
for
-
all
type
ctype
::
{
LHsType
RdrName
}
:
'forall'
tv_bndrs
'.'
ctype
{
LL
$
mkExplicitHsForAllTy
$2
(
noLoc
[])
$4
}
...
...
@@ -1023,10 +1012,6 @@ ctype :: { LHsType RdrName }
|
ipvar
'::'
type
{
LL
(
HsPredTy
(
HsIParam
(
unLoc
$1
)
$3
))
}
|
type
{
$1
}
type
::
{
LHsType
RdrName
}
:
ipvar
'::'
gentype
{
LL
(
HsPredTy
(
HsIParam
(
unLoc
$1
)
$3
))
}
|
gentype
{
$1
}
----------------------
--
Notes
for
'ctypedoc'
--
It
would
have
been
nice
to
simplify
the
grammar
by
unifying
`
ctype
`
and
...
...
@@ -1045,10 +1030,6 @@ ctypedoc :: { LHsType RdrName }
| ipvar '
::
' type { LL (HsPredTy (HsIParam (unLoc $1) $3)) }
| typedoc { $1 }
typedoc :: { LHsType RdrName }
: ipvar '
::
' gentype { LL (HsPredTy (HsIParam (unLoc $1) $3)) }
| gentypedoc { $1 }
----------------------
-- Notes for '
context
'
-- We parse a context as a btype so that we don'
t
get
reduce
/
reduce
...
...
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