From 3c9b76400188348088589b4ad22eaf60e368e019 Mon Sep 17 00:00:00 2001 From: Preetham Gujjula Date: Fri, 20 Dec 2024 06:12:19 -0800 Subject: [PATCH] Ormolu --- src/Math/NumberTheory/Prime/Count.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Math/NumberTheory/Prime/Count.hs b/src/Math/NumberTheory/Prime/Count.hs index 72252d7..f451861 100644 --- a/src/Math/NumberTheory/Prime/Count.hs +++ b/src/Math/NumberTheory/Prime/Count.hs @@ -35,7 +35,7 @@ import Text.Read (readMaybe) -- is larger than 'primePiMaxBound'. Also might throw an error if there's not -- enough memory available to compute the result, which can happen even if @n@ -- is smaller than @primePiMaxBound@. -primePi :: Integral a => a -> a +primePi :: (Integral a) => a -> a primePi n | n < 0 = 0 | n' <= bound = fromIntegral (primecount_pi (fromInteger n')) @@ -76,7 +76,7 @@ primePiStr n = unsafePerformIO $ do -- -- * Throws an error if the input is less than 1. -- * Throws an error if the input is larger than 'nthPrimeMaxBound`. -nthPrime :: Integral a => a -> a +nthPrime :: (Integral a) => a -> a nthPrime n | n < 1 = error "nthPrime: n must be >= 1" | n' > bound = error "nthPrime: answer cannot be packed into a 64-bit int" @@ -96,7 +96,7 @@ nthPrimeMaxBound = 216289611853439384 -- | @primePhi n a@ counts the number of positive integers @<= n@ that are not -- divisible by any of the first @a@ primes. Throws an error if @n@ is larger -- than @'maxBound' :: 'Int64'@. -primePhi :: Integral a => a -> a -> a +primePhi :: (Integral a) => a -> a -> a primePhi n a | n <= 0 = 0 | a <= 0 = n