[commit: ghc] master: Specialise lcm :: Word -> Word -> Word (trac#14424) (66b5b3e)
git at git.haskell.org
git at git.haskell.org
Mon Nov 6 21:39:59 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/66b5b3eef1aa9fa9f192a85847d34b2756bec33f/ghc
>---------------------------------------------------------------
commit 66b5b3eef1aa9fa9f192a85847d34b2756bec33f
Author: Bodigrim <andrew.lelechenko at gmail.com>
Date: Mon Nov 6 21:49:11 2017 +0200
Specialise lcm :: Word -> Word -> Word (trac#14424)
>---------------------------------------------------------------
66b5b3eef1aa9fa9f192a85847d34b2756bec33f
libraries/base/GHC/Real.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs
index 6206598..85a1602 100644
--- a/libraries/base/GHC/Real.hs
+++ b/libraries/base/GHC/Real.hs
@@ -631,6 +631,7 @@ gcd x y = gcd' (abs x) (abs y)
-- | @'lcm' x y@ is the smallest positive integer that both @x@ and @y@ divide.
lcm :: (Integral a) => a -> a -> a
{-# SPECIALISE lcm :: Int -> Int -> Int #-}
+{-# SPECIALISE lcm :: Word -> Word -> Word #-}
{-# NOINLINE [1] lcm #-}
lcm _ 0 = 0
lcm 0 _ = 0
More information about the ghc-commits
mailing list