module Numeric.Units.Dimensional.UnitNames.InterchangeNames
(
InterchangeNameAuthority(..),
InterchangeName(..),
HasInterchangeName(..)
)
where
import Control.DeepSeq
import Data.Data
import GHC.Generics
import Prelude
data InterchangeNameAuthority = UCUM
| DimensionalLibrary
| Custom
deriving (Eq, Ord, Show, Data, Typeable, Generic)
instance NFData InterchangeNameAuthority where
data InterchangeName = InterchangeName { name :: String, authority :: InterchangeNameAuthority, isAtomic :: Bool }
deriving (Eq, Ord, Data, Typeable, Generic)
instance NFData InterchangeName where
instance Show InterchangeName where
show n = name n ++ " (Issued by " ++ show (authority n) ++ ")"
class HasInterchangeName a where
interchangeName :: a -> InterchangeName
instance HasInterchangeName InterchangeName where
interchangeName = id