dimensional-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
  - isAtomic :: Bool
  }
- class HasInterchangeName a where
  - interchangeName :: a -> InterchangeName

# 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 # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Methods (==) :: InterchangeNameAuthority -> InterchangeNameAuthority -> Bool Source # (/=) :: InterchangeNameAuthority -> InterchangeNameAuthority -> Bool Source #
Data InterchangeNameAuthority Source # |

Instance details

Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames

Methods

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

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

toConstr :: InterchangeNameAuthority -> Constr Source #

dataTypeOf :: InterchangeNameAuthority -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord InterchangeNameAuthority Source # |

Instance details

Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames

Methods

compare :: InterchangeNameAuthority -> InterchangeNameAuthority -> Ordering Source #

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

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

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

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

max :: InterchangeNameAuthority -> InterchangeNameAuthority -> InterchangeNameAuthority Source #

min :: InterchangeNameAuthority -> InterchangeNameAuthority -> InterchangeNameAuthority Source #

Show InterchangeNameAuthority Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Methods showsPrec :: Int -> InterchangeNameAuthority -> ShowS Source # show :: InterchangeNameAuthority -> String Source # showList :: [InterchangeNameAuthority] -> ShowS Source #
Generic InterchangeNameAuthority Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Associated Types type Rep InterchangeNameAuthority :: Type -> Type Source # Methods from :: InterchangeNameAuthority -> Rep InterchangeNameAuthority x Source # to :: Rep InterchangeNameAuthority x -> InterchangeNameAuthority Source #
NFData InterchangeNameAuthority Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Methods rnf :: InterchangeNameAuthority -> () Source #
type Rep InterchangeNameAuthority Source # |

Instance details

Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames

type Rep InterchangeNameAuthority = D1 (MetaData "InterchangeNameAuthority" "Numeric.Units.Dimensional.UnitNames.InterchangeNames" "dimensional-1.3-274xP0y65I5DuMSwKMSL6k" False) (C1 (MetaCons "UCUM" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "DimensionalLibrary" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Custom" PrefixI False) (U1 :: Type -> Type)))

data InterchangeName Source #

Constructors

InterchangeName |

Fields

- name :: String
- authority :: InterchangeNameAuthority
- isAtomic :: Bool

Instances

Eq InterchangeName Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Methods (==) :: InterchangeName -> InterchangeName -> Bool Source # (/=) :: InterchangeName -> InterchangeName -> Bool Source #
Data InterchangeName Source # |

Instance details

Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames

Methods

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

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

toConstr :: InterchangeName -> Constr Source #

dataTypeOf :: InterchangeName -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord InterchangeName Source # |

Instance details

Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames

Methods

compare :: InterchangeName -> InterchangeName -> Ordering Source #

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

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

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

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

max :: InterchangeName -> InterchangeName -> InterchangeName Source #

min :: InterchangeName -> InterchangeName -> InterchangeName Source #

Show InterchangeName Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Methods showsPrec :: Int -> InterchangeName -> ShowS Source # show :: InterchangeName -> String Source # showList :: [InterchangeName] -> ShowS Source #
Generic InterchangeName Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Associated Types type Rep InterchangeName :: Type -> Type Source # Methods from :: InterchangeName -> Rep InterchangeName x Source # to :: Rep InterchangeName x -> InterchangeName Source #
NFData InterchangeName Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Methods rnf :: InterchangeName -> () Source #
HasInterchangeName InterchangeName Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Methods interchangeName :: InterchangeName -> InterchangeName Source #
type Rep InterchangeName Source # |

Instance details

Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames

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

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`.

Methods

interchangeName :: a -> InterchangeName Source #

Instances

HasInterchangeName InterchangeName Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.InterchangeNames Methods interchangeName :: InterchangeName -> InterchangeName Source #
HasInterchangeName Prefix Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.Internal Methods interchangeName :: Prefix -> InterchangeName Source #
HasInterchangeName AnyUnit Source # |
Instance details Defined in Numeric.Units.Dimensional.Dynamic Methods interchangeName :: AnyUnit -> InterchangeName Source #
HasInterchangeName (NameAtom m) Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.Internal Methods interchangeName :: NameAtom m -> InterchangeName Source #
HasInterchangeName (UnitName m) Source # |
Instance details Defined in Numeric.Units.Dimensional.UnitNames.Internal Methods interchangeName :: UnitName m -> InterchangeName Source #
HasInterchangeName (Unit m d a) Source # |
Instance details Defined in Numeric.Units.Dimensional.Internal Methods interchangeName :: Unit m d a -> InterchangeName Source #