summaryrefslogtreecommitdiff
path: root/src/PGF/CId.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-07-07 22:22:05 +0000
committerkrasimir <krasimir@chalmers.se>2009-07-07 22:22:05 +0000
commitc99b64404dd6b776d80b36ae3e1b8ef4e80949f7 (patch)
treeacfc35adf02cb9bd62e72f05bf39b327fea42da3 /src/PGF/CId.hs
parentbb3040e2c47d7203a05dd41ff512ae0ee03382d1 (diff)
bugfixes in the parser for PGF.Type.Type
Diffstat (limited to 'src/PGF/CId.hs')
-rw-r--r--src/PGF/CId.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/PGF/CId.hs b/src/PGF/CId.hs
index 99325975e..0d1a2f5c6 100644
--- a/src/PGF/CId.hs
+++ b/src/PGF/CId.hs
@@ -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)