File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed
Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff 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
853855fromFixedDecimalBounded ::
Original file line number Diff line number Diff 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
4748arithM :: MonadThrow m => Arith a -> m a
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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)
404403assertException :: (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
425425roundHalfUpTo :: Natural -> Rational -> Rational
426426roundHalfUpTo to rational =
You can’t perform that action at this time.
0 commit comments