: '(' exportlist ')' { Just $2 }
| {- empty -} { Nothing }
-exportlist :: { [LIE RdrName] }
- : exportlist ',' export { $3 : $1 }
- | exportlist ',' { $1 }
- | export { [$1] }
+exportlist :: { [LIE RdrName] }
+ : ',' { [] }
+ | exportlist1 { $1 }
+
+exportlist1 :: { [LIE RdrName] }
+ : export { [$1] }
+ | export ',' exportlist { $1 : $3 }
| {- empty -} { [] }
-- No longer allow things like [] and (,,,) to be exported
| {- 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)) }
alt :: { LMatch RdrName }
: infixexp opt_sig alt_rhs {% checkPattern $1 >>= \p ->
return (LL (Match [p] $2 (unLoc $3))) }
+ | '!' infixexp opt_sig alt_rhs {% checkPattern $2 >>= \p ->
+ return (LL (Match [LL $ BangPat p] $3 (unLoc $4))) }
alt_rhs :: { Located (GRHSs RdrName) }
: ralt wherebinds { LL (GRHSs (unLoc $1) (unLoc $2)) }
| 'dynamic' { L1 FSLIT("dynamic") }
| 'stdcall' { L1 FSLIT("stdcall") }
| 'ccall' { L1 FSLIT("ccall") }
+ | 'iso' { L1 FSLIT("iso") }
special_sym :: { Located FastString }
special_sym : '!' { L1 FSLIT("!") }