dimensional-1.0.1.3: Statically checked physical dimensions, using Type Families and Data Kinds.

Safe Haskell | Safe
Language | Haskell2010

Numeric.Units.Dimensional.UnitNames.InterchangeNames

Synopsis

- data InterchangeNameAuthority
  - = UCUM
  - | DimensionalLibrary
  - | Custom
- data InterchangeName = InterchangeName {
  - name :: String
  - authority :: InterchangeNameAuthority
  }
- class HasInterchangeName a where

# Documentation

data InterchangeNameAuthority Source #

Represents the authority which issued an interchange name for a unit.

Constructors

UCUM | The interchange name originated with the Unified Code for Units of Measure.
DimensionalLibrary | The interchange name originated with the dimensional library.
Custom | The interchange name originated with a user of the dimensional library.

Instances

Eq InterchangeNameAuthority Source # |
Methods (==) :: InterchangeNameAuthority -> InterchangeNameAuthority -> Bool # (/=) :: InterchangeNameAuthority -> InterchangeNameAuthority -> Bool #
Data InterchangeNameAuthority Source # |

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InterchangeNameAuthority -> c InterchangeNameAuthority #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InterchangeNameAuthority #

toConstr :: InterchangeNameAuthority -> Constr #

dataTypeOf :: InterchangeNameAuthority -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c InterchangeNameAuthority) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InterchangeNameAuthority) #

gmapT :: (forall b. Data b => b -> b) -> InterchangeNameAuthority -> InterchangeNameAuthority #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InterchangeNameAuthority -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InterchangeNameAuthority -> r #

gmapQ :: (forall d. Data d => d -> u) -> InterchangeNameAuthority -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> InterchangeNameAuthority -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InterchangeNameAuthority -> m InterchangeNameAuthority #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InterchangeNameAuthority -> m InterchangeNameAuthority #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InterchangeNameAuthority -> m InterchangeNameAuthority #

Ord InterchangeNameAuthority Source # |

Methods

compare :: InterchangeNameAuthority -> InterchangeNameAuthority -> Ordering #

(<) :: InterchangeNameAuthority -> InterchangeNameAuthority -> Bool #

(<=) :: InterchangeNameAuthority -> InterchangeNameAuthority -> Bool #

(>) :: InterchangeNameAuthority -> InterchangeNameAuthority -> Bool #

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

max :: InterchangeNameAuthority -> InterchangeNameAuthority -> InterchangeNameAuthority #

min :: InterchangeNameAuthority -> InterchangeNameAuthority -> InterchangeNameAuthority #

Show InterchangeNameAuthority Source # |
Methods showsPrec :: Int -> InterchangeNameAuthority -> ShowS # show :: InterchangeNameAuthority -> String # showList :: [InterchangeNameAuthority] -> ShowS #
Generic InterchangeNameAuthority Source # |
Associated Types type Rep InterchangeNameAuthority :: * -> * # Methods from :: InterchangeNameAuthority -> Rep InterchangeNameAuthority x # to :: Rep InterchangeNameAuthority x -> InterchangeNameAuthority #
type Rep InterchangeNameAuthority Source # |
type Rep InterchangeNameAuthority = D1 (MetaData "InterchangeNameAuthority" "Numeric.Units.Dimensional.UnitNames.InterchangeNames" "dimensional-1.0.1.3-J9LDKppAtjNKDu3TyelN12" False) ((:+:) (C1 (MetaCons "UCUM" PrefixI False) U1) ((:+:) (C1 (MetaCons "DimensionalLibrary" PrefixI False) U1) (C1 (MetaCons "Custom" PrefixI False) U1)))

data InterchangeName Source #

Constructors

InterchangeName |

Fields

- name :: String
- authority :: InterchangeNameAuthority

Instances

Eq InterchangeName Source # |
Methods (==) :: InterchangeName -> InterchangeName -> Bool # (/=) :: InterchangeName -> InterchangeName -> Bool #
Data InterchangeName Source # |

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InterchangeName -> c InterchangeName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InterchangeName #

toConstr :: InterchangeName -> Constr #

dataTypeOf :: InterchangeName -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c InterchangeName) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InterchangeName) #

gmapT :: (forall b. Data b => b -> b) -> InterchangeName -> InterchangeName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InterchangeName -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InterchangeName -> r #

gmapQ :: (forall d. Data d => d -> u) -> InterchangeName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> InterchangeName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InterchangeName -> m InterchangeName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InterchangeName -> m InterchangeName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InterchangeName -> m InterchangeName #

Ord InterchangeName Source # |

Methods

compare :: InterchangeName -> InterchangeName -> Ordering #

(<) :: InterchangeName -> InterchangeName -> Bool #

(<=) :: InterchangeName -> InterchangeName -> Bool #

(>) :: InterchangeName -> InterchangeName -> Bool #

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

max :: InterchangeName -> InterchangeName -> InterchangeName #

min :: InterchangeName -> InterchangeName -> InterchangeName #

Show InterchangeName Source # |
Methods showsPrec :: Int -> InterchangeName -> ShowS # show :: InterchangeName -> String # showList :: [InterchangeName] -> ShowS #
Generic InterchangeName Source # |
Associated Types type Rep InterchangeName :: * -> * # Methods from :: InterchangeName -> Rep InterchangeName x # to :: Rep InterchangeName x -> InterchangeName #
HasInterchangeName InterchangeName Source # |
Methods interchangeName :: InterchangeName -> InterchangeName Source #
type Rep InterchangeName Source # |

type Rep InterchangeName = D1 (MetaData "InterchangeName" "Numeric.Units.Dimensional.UnitNames.InterchangeNames" "dimensional-1.0.1.3-J9LDKppAtjNKDu3TyelN12" False) (C1 (MetaCons "InterchangeName" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "name") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) (S1 (MetaSel (Just Symbol "authority") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 InterchangeNameAuthority))))

class HasInterchangeName a where Source #

Determines the authority which issued the interchange name of a unit or unit name. For composite units, this is the least-authoritative interchange name of any constituent name.

Note that the least-authoritative authority is the one sorted as greatest by the `Ord` instance of `InterchangeNameAuthority`.

Minimal complete definition

interchangeName

Methods

interchangeName :: a -> InterchangeName Source #

Instances

HasInterchangeName InterchangeName Source # |
Methods interchangeName :: InterchangeName -> InterchangeName Source #
HasInterchangeName (NameAtom m) Source # |
Methods interchangeName :: NameAtom m -> InterchangeName Source #
HasInterchangeName (UnitName m) Source # |
Methods interchangeName :: UnitName m -> InterchangeName Source #
HasInterchangeName (Unit m d a) Source # |
Methods interchangeName :: Unit m d a -> InterchangeName Source #