Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PRationalNoReduce (s :: S) = PRationalNoReduce (Term s PRational)
- pnoReduce :: forall (s :: S). Term s PRational -> Term s PRationalNoReduce
- preduce' :: forall (s :: S). Term s PRationalNoReduce -> Term s PRational
- mulTruncate :: forall (s :: S). Term s (PRational :--> (PInteger :--> PInteger))
- mulDivTruncate :: forall (s :: S). Term s (PInteger :--> (PInteger :--> (PInteger :--> PInteger)))
- divTruncate :: forall (s :: S). Term s (PRational :--> (PInteger :--> PInteger))
- mulRational :: forall (s :: S). Term s (PInteger :--> (PRational :--> PRational))
- divRational :: forall (s :: S). Term s (PInteger :--> (PRational :--> PRational))
- pliftTaggedRational :: forall k (tag :: k). HasCallStack => ClosedTerm (PTagged tag PRational) -> Tagged tag Rational
- (#%) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PRational
Documentation
newtype PRationalNoReduce (s :: S) Source #
Wrapper for PRational
. Numeric instances of this don't reduce the
fraction after each operation.
Instances
pnoReduce :: forall (s :: S). Term s PRational -> Term s PRationalNoReduce Source #
Put a PRational
into a wrapper that prevents reducing after every numeric operation.
Since: 3.12.2
preduce' :: forall (s :: S). Term s PRationalNoReduce -> Term s PRational Source #
Free a PRational
from its no-reduce-wrapper and reduce it.
Since: 3.12.2
mulTruncate :: forall (s :: S). Term s (PRational :--> (PInteger :--> PInteger)) Source #
Combined multiply-truncate.
Since: 3.9.0
mulDivTruncate :: forall (s :: S). Term s (PInteger :--> (PInteger :--> (PInteger :--> PInteger))) Source #
Multiply the first argument by the second argument, divide by the third, truncating.
Since: 3.9.0
divTruncate :: forall (s :: S). Term s (PRational :--> (PInteger :--> PInteger)) Source #
Combined divide-truncate.
Since: 3.9.0
divRational :: forall (s :: S). Term s (PInteger :--> (PRational :--> PRational)) Source #
Scale a PRational
down by a factor indicated by a PInteger
, without
reducing the fraction.
Note
This has the same performance caveats as mulRational
.
Since: 3.9.0
pliftTaggedRational :: forall k (tag :: k). HasCallStack => ClosedTerm (PTagged tag PRational) -> Tagged tag Rational Source #
plift
for Tagged Rationals (kind polymorphic)