bugfixes in the parser for PGF.Type.Type

This commit is contained in:
krasimir
2009-07-07 22:22:05 +00:00
parent bb3040e2c4
commit c99b64404d
2 changed files with 16 additions and 15 deletions

View File

@@ -36,7 +36,10 @@ instance Read CId where
readsPrec _ = RP.readP_to_S pCId
pCId :: RP.ReadP CId
pCId = fmap mkCId pIdent
pCId = do s <- pIdent
if s == "_"
then RP.pfail
else return (mkCId s)
pIdent :: RP.ReadP String
pIdent = liftM2 (:) (RP.satisfy isIdentFirst) (RP.munch isIdentRest)