summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-02-24 00:36:55 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-02-24 00:36:55 +0000
commitc4a5198f3330b4293c14d4ff2801475ef58ba43a (patch)
treefe82715cae8a8ab4bccf449e85e530a4c222ce75
parent9f8e83010903509d338722c4a2adef295e8ea67e (diff)
downloadgausshs-c4a5198f3330b4293c14d4ff2801475ef58ba43a.tar
gausshs-c4a5198f3330b4293c14d4ff2801475ef58ba43a.tar.gz
gausshs-c4a5198f3330b4293c14d4ff2801475ef58ba43a.tar.bz2
gausshs-c4a5198f3330b4293c14d4ff2801475ef58ba43a.tar.xz
gausshs-c4a5198f3330b4293c14d4ff2801475ef58ba43a.zip
Fixed constraints of pPrint
-rwxr-xr-xrpn.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpn.hs b/rpn.hs
index 68c0831..ff7dd6c 100755
--- a/rpn.hs
+++ b/rpn.hs
@@ -40,7 +40,7 @@ fromSymbol (Number x d) = (x, d)
40fromSymbol _ = (0, 0) 40fromSymbol _ = (0, 0)
41 41
42 42
43pPrint :: Show a => Symbol a -> String 43pPrint :: (Show a, Fractional a) => Symbol a -> String
44pPrint (Number x d) = (show x) ++ " ± " ++ (show d) ++ " (relative error: " ++ (show $ d / x) ++ ")" 44pPrint (Number x d) = (show x) ++ " ± " ++ (show d) ++ " (relative error: " ++ (show $ d / x) ++ ")"
45pPrint s = show s 45pPrint s = show s
46 46