summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Real.hs
diff options
context:
space:
mode:
authorBodigrim <andrew.lelechenko@gmail.com>2017-11-06 21:49:11 +0200
committerBen Gamari <ben@smart-cactus.org>2017-11-06 16:39:20 -0500
commit66b5b3eef1aa9fa9f192a85847d34b2756bec33f (patch)
tree103abd1fd00ea6fbaea46203acd5276ff6e359ed /libraries/base/GHC/Real.hs
parent59de290928e6903337f31c1f8107ac8a98ea145d (diff)
downloadhaskell-66b5b3eef1aa9fa9f192a85847d34b2756bec33f.tar.gz
Specialise lcm :: Word -> Word -> Word (trac#14424)
Diffstat (limited to 'libraries/base/GHC/Real.hs')
-rw-r--r--libraries/base/GHC/Real.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs
index 6206598e39..85a160258c 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