simplify FSymbol type

This commit is contained in:
krasimir
2008-05-29 11:43:28 +00:00
parent 4d1809ef2d
commit 363ddd7b91
6 changed files with 31 additions and 35 deletions

View File

@@ -59,7 +59,7 @@ fcatVar = (-4)
-- Symbol
type FIndex = Int
data FSymbol
= FSymCat {-# UNPACK #-} !FCat {-# UNPACK #-} !FIndex {-# UNPACK #-} !Int
= FSymCat {-# UNPACK #-} !FIndex {-# UNPACK #-} !Int
| FSymTok FToken
@@ -78,7 +78,7 @@ instance Print CId where
prt = prCId
instance Print FSymbol where
prt (FSymCat c l n) = "($" ++ prt n ++ "!" ++ prt l ++ ")"
prt (FSymCat l n) = "($" ++ prt n ++ "!" ++ prt l ++ ")"
prt (FSymTok t) = simpleShow (prt t)
where simpleShow str = "\"" ++ concatMap mkEsc str ++ "\""
mkEsc '\\' = "\\\\"