aboutsummaryrefslogtreecommitdiffstats
path: root/src/Plugin
diff options
context:
space:
mode:
authorTeddy Wing2017-08-20 12:45:17 +0200
committerTeddy Wing2017-08-20 15:15:14 +0200
commitde7e162e6865b9e805154b7c7178406309746e6f (patch)
treea2c59126b3d2a7ea9eff762e2a02f1b909b093d7 /src/Plugin
parente94543c1b42bac8928aa8bf4fa3341563f7631b8 (diff)
downloadsorbot-de7e162e6865b9e805154b7c7178406309746e6f.tar.bz2
Factorial: Use `Integral`
Apparently that's short for `Enum a, Num a`.
Diffstat (limited to 'src/Plugin')
-rw-r--r--src/Plugin/Factorial.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Plugin/Factorial.hs b/src/Plugin/Factorial.hs
index f8cfee2..692d20f 100644
--- a/src/Plugin/Factorial.hs
+++ b/src/Plugin/Factorial.hs
@@ -25,5 +25,5 @@ factorialAction message = do
let number = last m
return $ Right $ showt $ calculate $ (read number :: Int)
-calculate :: (Enum a, Num a) => a -> a
+calculate :: (Integral a) => a -> a
calculate n = product [1..n]