I am busy checking that I can exactprint all the RdrNames produced by the
parser, and came across this

isBuiltInOcc_maybe occ
  = case occNameString occ of
        "[]"             -> choose_ns listTyCon nilDataCon
        ":"              -> Just consDataConName
        "[::]"           -> Just parrTyConName
        "(##)"           -> choose_ns unboxedUnitTyCon unboxedUnitDataCon
        "()"             -> choose_ns unitTyCon        unitDataCon
        '(':'#':',':rest -> parse_tuple UnboxedTuple 2 rest
        '(':',':rest     -> parse_tuple BoxedTuple   2 rest
        _other           -> Nothing

The above code does not allow any spaces between '[' and ']', or '[:' and
':]' (for example)

However, the parse rules DO allow spaces

        | '[' ']'               {% ams (sLL $1 $> $ listTyCon_RDR) [mos
$1,mcs $2] }
        | '[:' ':]'             {% ams (sLL $1 $> $ parrTyCon_RDR) [mo
$1,mc $2] }

Is this a problem?

Alan
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to