Skip to content

Commit 8b62870

Browse files
authored
Merge pull request #12 from ju1m/fix-build
Fix build
2 parents 50c037b + 5cf1d5b commit 8b62870

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

src/Numeric/Decimal.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,10 @@ fromFixedDecimal = coerce
846846
-- Arith 123.458
847847
-- >>> fromFixedDecimalBounded (123.458 :: Fixed E3) :: Arith (Decimal RoundToZero 3 Int8)
848848
-- ArithError arithmetic overflow
849+
-- ...
849850
-- >>> fromFixedDecimalBounded (-123.458 :: Fixed E3) :: Arith (Decimal RoundToZero 3 Word)
850851
-- ArithError arithmetic underflow
852+
-- ...
851853
--
852854
-- @since 0.2.0
853855
fromFixedDecimalBounded ::

src/Numeric/Decimal/BoundedArithmetic.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ instance Bounded a => Bounded (Arith a) where
4242
-- *** Exception: arithmetic underflow
4343
-- >>> 1.1 - 123 :: Arith (Decimal RoundDown 3 Word)
4444
-- ArithError arithmetic underflow
45+
-- ...
4546
--
4647
-- @since 0.2.0
4748
arithM :: MonadThrow m => Arith a -> m a

src/Numeric/Decimal/Internal.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,8 +993,10 @@ signumDecimalBounded d = fromIntegerDecimalBounded $ signumDecimal (toInteger <$
993993
--
994994
-- >>> -1.28 :: Arith (Decimal RoundHalfUp 2 Int8)
995995
-- ArithError arithmetic overflow
996+
-- ...
996997
-- >>> negate (1.28 :: Arith (Decimal RoundHalfUp 2 Int8))
997998
-- ArithError arithmetic overflow
999+
-- ...
9981000
-- >>> :set -XNegativeLiterals
9991001
-- >>> -1.28 :: Arith (Decimal RoundHalfUp 2 Int8)
10001002
-- Arith -1.28

tests/Numeric/DecimalSpec.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE KindSignatures #-}
23
{-# LANGUAGE AllowAmbiguousTypes #-}
34
{-# LANGUAGE TypeApplications #-}
@@ -398,9 +399,7 @@ spec = do
398399
specRounding @4 @3 @Integer
399400
specRounding @4 @4 @Integer
400401

401-
402-
403-
402+
#if !MIN_VERSION_QuickCheck(2,15,0)
404403
assertException :: (NFData a, Exception exc) =>
405404
(exc -> Bool) -- ^ Return True if that is the exception that was expected
406405
-> a -- ^ Value that should throw an exception, when fully evaluated
@@ -421,6 +420,7 @@ assertExceptionIO isExc action =
421420
res `deepseq` return False) $ \exc ->
422421
show exc `deepseq` return (isExc exc))
423422
assert hasFailed
423+
#endif
424424

425425
roundHalfUpTo :: Natural -> Rational -> Rational
426426
roundHalfUpTo to rational =

0 commit comments

Comments
 (0)