: '(' exportlist ')' { Just $2 }
| {- empty -} { Nothing }
-exportlist :: { [LIE RdrName] }
+exportlist :: { [LIE RdrName] }
+ : ',' { [] }
+ | exportlist1 { $1 }
+
+exportlist1 :: { [LIE RdrName] }
: export { [$1] }
| export ',' exportlist { $1 : $3 }
| {- empty -} { [] }
| {- empty -} { noLoc Nothing }
impspec :: { Located (Bool, [LIE RdrName]) }
- : '(' exportlist ')' { LL (False, reverse $2) }
- | 'hiding' '(' exportlist ')' { LL (True, reverse $3) }
+ : '(' exportlist ')' { LL (False, $2) }
+ | 'hiding' '(' exportlist ')' { LL (True, $3) }
-----------------------------------------------------------------------------
-- Fixity Declarations
{ LL (mkGadtDecl $1 $3) }
-- Syntax: Maybe merge the record stuff with the single-case above?
-- (to kill the mostly harmless reduce/reduce error)
- -- XXX revisit autrijus
+ -- XXX revisit audreyt
| constr_stuff_record '::' sigtype
{ let (con,details) = unLoc $1 in
LL (ConDecl con Implicit [] (noLoc []) details (ResTyGADT $3)) }