From d41616dd6aa52c813edf7dabef4c0684fae4e4e0 Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 20 Oct 2008 11:59:31 +0000 Subject: Added Read and Show instances for CId. Also added readCId :: String -> Maybe CId, and use that for readLanguage. --- src/PGF/Expr.hs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/PGF/Expr.hs') diff --git a/src/PGF/Expr.hs b/src/PGF/Expr.hs index 0dde19310..3b8ec01bc 100644 --- a/src/PGF/Expr.hs +++ b/src/PGF/Expr.hs @@ -10,7 +10,7 @@ module PGF.Expr(Tree(..), Literal(..), Value(..), Env, eval, apply, -- helpers - pIdent,pStr,pFactor + pStr,pFactor ) where import PGF.CId @@ -145,13 +145,6 @@ pStr = RP.char '"' >> (RP.manyTill (pEsc RP.<++ RP.get) (RP.char '"')) where pEsc = RP.char '\\' >> RP.get -pCId = fmap mkCId pIdent - -pIdent = liftM2 (:) (RP.satisfy isIdentFirst) (RP.munch isIdentRest) - where - isIdentFirst c = c == '_' || isLetter c - isIdentRest c = c == '_' || c == '\'' || isAlphaNum c - ----------------------------------------------------- -- Printing -- cgit v1.2.3