technique-0.2.5: Procedures and Sequences
Safe HaskellNone
LanguageHaskell2010

Technique.Quantity

Synopsis

Documentation

data Quantity Source #

Instances

Instances details
Eq Quantity Source # 
Instance details

Defined in Technique.Quantity

Ord Quantity Source # 
Instance details

Defined in Technique.Quantity

Show Quantity Source # 
Instance details

Defined in Technique.Quantity

Render Quantity Source # 
Instance details

Defined in Technique.Formatter

Associated Types

type Token Quantity #

Pretty Quantity Source # 
Instance details

Defined in Technique.Formatter

Methods

pretty :: Quantity -> Doc ann #

prettyList :: [Quantity] -> Doc ann #

type Token Quantity Source # 
Instance details

Defined in Technique.Formatter

data Decimal Source #

A decimal number with a fixed point resolution. The resolution (number of decimal places) is arbitrary within the available range. This isn't really for numerical analysis. It is for carrying information.

Implementation note

Internally this is a floating point where the mantissa is 19 characters wide (the width of a 64-bit int in base 10). Thus the biggest number representable is 9223372036854775807 and the smallest is 0.0000000000000000001. We could change this to Integer and be arbitrary precision but meh.

Constructors

Decimal Int64 Int8 

Instances

Instances details
Eq Decimal Source # 
Instance details

Defined in Technique.Quantity

Methods

(==) :: Decimal -> Decimal -> Bool #

(/=) :: Decimal -> Decimal -> Bool #

Ord Decimal Source # 
Instance details

Defined in Technique.Quantity

Show Decimal Source # 
Instance details

Defined in Technique.Quantity

Render Decimal Source # 
Instance details

Defined in Technique.Formatter

Associated Types

type Token Decimal #

type Token Decimal Source # 
Instance details

Defined in Technique.Formatter

data Unit Source #

Constructors

Unit 

Instances

Instances details
Eq Unit Source # 
Instance details

Defined in Technique.Quantity

Methods

(==) :: Unit -> Unit -> Bool #

(/=) :: Unit -> Unit -> Bool #

Show Unit Source # 
Instance details

Defined in Technique.Quantity

Methods

showsPrec :: Int -> Unit -> ShowS #

show :: Unit -> String #

showList :: [Unit] -> ShowS #

data Group Source #

Whether Système International metric prefixes can be used, or (as is the case of time units) quantities should not be aggregated to other scales.

Instances

Instances details
Eq Group Source # 
Instance details

Defined in Technique.Quantity

Methods

(==) :: Group -> Group -> Bool #

(/=) :: Group -> Group -> Bool #

Show Group Source # 
Instance details

Defined in Technique.Quantity

Methods

showsPrec :: Int -> Group -> ShowS #

show :: Group -> String #

showList :: [Group] -> ShowS #

data Prefix Source #

Constructors

Prefix 

Instances

Instances details
Eq Prefix Source # 
Instance details

Defined in Technique.Quantity

Methods

(==) :: Prefix -> Prefix -> Bool #

(/=) :: Prefix -> Prefix -> Bool #

Show Prefix Source # 
Instance details

Defined in Technique.Quantity