logo       

[GHC] #870: extra commas accepted in import export lists: msg#00124

lang.haskell.glasgow.bugs

Subject: [GHC] #870: extra commas accepted in import export lists

#870: extra commas accepted in import export lists
-------------------------+--------------------------------------------------
Reporter: ross | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.4.2
Severity: normal | Keywords:
Os: Unknown | Difficulty: Unknown
Architecture: Unknown |
-------------------------+--------------------------------------------------
GHC accepts non-standard imports like
{{{
import M (,,foo,,,bar,,,)
}}}
creating problems for other Haskell implementations. Ditto for exports.

Suggest modifying this part of the grammar:
{{{
exportlist :: { [LIE RdrName] }
: exportlist ',' export { $3 : $1 }
| exportlist ',' { $1 }
| export { [$1] }
| {- empty -} { [] }
}}}
to
{{{
exportlist :: { [LIE RdrName] }
: exportlist1 ',' { $1 }
| exportlist1 { $1 }
| {- empty -} { [] }

exportlist1 :: { [LIE RdrName] }
: exportlist1 ',' export { $3 : $1 }
| export { [$1] }
}}}

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/870>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise