Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PFixed (unit :: Nat) (s :: S) = PFixed (Term s PInteger)
- class DivideSemigroup a where
- divide :: a -> a -> a
- class DivideSemigroup a => DivideMonoid a where
- one :: a
- fixedToAdaValue :: forall (s :: S) (unit :: Nat). KnownNat unit => Term s (PFixed unit :--> PValue 'Sorted 'NonZero)
- fromPInteger :: forall (unit :: Nat) (s :: S). KnownNat unit => Term s (PInteger :--> PFixed unit)
- toPInteger :: forall (unit :: Nat) (s :: S). KnownNat unit => Term s (PFixed unit :--> PInteger)
Documentation
newtype PFixed (unit :: Nat) (s :: S) Source #
Deprecated: Use PFixedDecimal instead
Fixed width decimal. Denominator will be given through typelit unit
.
This would be used for representing Ada value with some Lovelace changes.
Since: 3.12.0
Instances
class DivideSemigroup a where Source #
class DivideSemigroup a => DivideMonoid a where Source #
fixedToAdaValue :: forall (s :: S) (unit :: Nat). KnownNat unit => Term s (PFixed unit :--> PValue 'Sorted 'NonZero) Source #
Convert given fixed into Ada value. Input should be Ada value with decimals; outputs will be lovelace values in integer.
Since: 3.9.0