From 890d45579300f39d50a5a18a9f6feed8634ae8ba Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 27 Jan 2010 09:39:14 +0000 Subject: cleanup the code of the PGF interpreter and polish the binary serialization to match the preliminary specification --- src/runtime/haskell/PGF/Expr.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/runtime/haskell/PGF/Expr.hs') diff --git a/src/runtime/haskell/PGF/Expr.hs b/src/runtime/haskell/PGF/Expr.hs index 2357026ab..674422217 100644 --- a/src/runtime/haskell/PGF/Expr.hs +++ b/src/runtime/haskell/PGF/Expr.hs @@ -31,7 +31,7 @@ import qualified Text.ParserCombinators.ReadP as RP data Literal = LStr String -- ^ string constant - | LInt Integer -- ^ integer constant + | LInt Int -- ^ integer constant | LFlt Double -- ^ floating point constant deriving (Eq,Ord,Show) @@ -116,11 +116,11 @@ unStr (ELit (LStr s)) = Just s unStr _ = Nothing -- | Constructs an expression from integer literal -mkInt :: Integer -> Expr +mkInt :: Int -> Expr mkInt i = ELit (LInt i) -- | Decomposes an expression into integer literal -unInt :: Expr -> Maybe Integer +unInt :: Expr -> Maybe Int unInt (ELit (LInt i)) = Just i unInt _ = Nothing @@ -236,7 +236,7 @@ ppBind Explicit x = ppCId x ppBind Implicit x = PP.braces (ppCId x) ppLit (LStr s) = PP.text (show s) -ppLit (LInt n) = PP.integer n +ppLit (LInt n) = PP.int n ppLit (LFlt d) = PP.double d ppMeta :: MetaId -> PP.Doc -- cgit v1.2.3