Possible error with strict_mark in Parser.y
Alan & Kim Zimmerman
alan.zimm at gmail.com
Sun Nov 30 18:18:51 UTC 2014
If I look at the production for strict_mark in the parser
https://github.com/ghc/ghc/blob/master/compiler/parser/Parser.y#L1355
strict_mark :: { Located ([AddAnn],HsBang) }
: '!' { sL1 $1 ([],HsUserBang Nothing
True) }
| '{-# UNPACK' '#-}' { sLL $1 $> ([mo $1,mc $2],HsUserBang
(Just True) False) }
| '{-# NOUNPACK' '#-}' { sLL $1 $> ([mo $1,mc $2],HsUserBang
(Just False) True) } -- ***Correct?
| '{-# UNPACK' '#-}' '!' { sLL $1 $> ([mo $1,mc $2],HsUserBang
(Just True) True) }
| '{-# NOUNPACK' '#-}' '!' { sLL $1 $> ([mo $1,mc $2],HsUserBang
(Just False) True) }
I would expect the final True or False value to reflect the presence of the
'!' mark.
But the second line has no '!' but returns True.
I suspect this is an error.
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141130/4069ab40/attachment.html>
More information about the ghc-devs
mailing list