summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-12-05 10:06:59 +0000
committerkrasimir <krasimir@chalmers.se>2009-12-05 10:06:59 +0000
commite06c7da79b7c26ca9c89bc3ca5a401dedde57fec (patch)
treefa8371340f5aaf015cbe37a374e264312583df73 /src
parentcec6c8ed97b006437a0dadfc1ac3650ae71c6e8a (diff)
fix the pattern matching in unStr, unInt, unDouble
Diffstat (limited to 'src')
-rw-r--r--src/PGF/Expr.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/PGF/Expr.hs b/src/PGF/Expr.hs
index 78dbfb6a8..bddbc84d4 100644
--- a/src/PGF/Expr.hs
+++ b/src/PGF/Expr.hs
@@ -112,6 +112,7 @@ mkStr s = ELit (LStr s)
-- | Decomposes an expression into string literal
unStr :: Expr -> Maybe String
unStr (ELit (LStr s)) = Just s
+unStr _ = Nothing
-- | Constructs an expression from integer literal
mkInt :: Integer -> Expr
@@ -120,6 +121,7 @@ mkInt i = ELit (LInt i)
-- | Decomposes an expression into integer literal
unInt :: Expr -> Maybe Integer
unInt (ELit (LInt i)) = Just i
+unInt _ = Nothing
-- | Constructs an expression from real number literal
mkDouble :: Double -> Expr
@@ -128,6 +130,7 @@ mkDouble f = ELit (LFlt f)
-- | Decomposes an expression into real number literal
unDouble :: Expr -> Maybe Double
unDouble (ELit (LFlt f)) = Just f
+unDouble _ = Nothing
-----------------------------------------------------
-- Parsing