fixed-decimal-0.0.2: Fixed precision decimals for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Fixed.Decimal.Class

Synopsis

Documentation

class FixedDecimal d where #

Fixed decimal types class

Associated Types

type Precision d #

Integral type for storing mantissa

type Scale d :: Nat #

The size of the fractional part in decimal digits

Methods

scale :: d -> Int #

Runtime value of Scale d

decimal :: Integral m => m -> Int -> d #

Value constructor

decimal m e constructs a decimal number via m * 10 ^^ e.

Instances

Instances details
(Integral m, KnownNat s) => FixedDecimal (Decimal m s) # 
Instance details

Defined in Data.Fixed.Decimal

Associated Types

type Precision (Decimal m s) 
Instance details

Defined in Data.Fixed.Decimal

type Precision (Decimal m s) = m
type Scale (Decimal m s) 
Instance details

Defined in Data.Fixed.Decimal

type Scale (Decimal m s) = s

Methods

scale :: Decimal m s -> Int #

decimal :: Integral m0 => m0 -> Int -> Decimal m s #