HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduledimensional-1.5Haskell2010

Numeric.Units.Dimensional.UnitNames

This module provides types and functions for manipulating unit names.

Please note that the details of the name representation may be less stable than the other APIs provided by this package, as new features using them are still being developed.

  • 7 types
  • 19 values
  • Packagedimensional-1.5
  • Exports26
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUnitNames.hs

Data Types

5 declarations
datadata UnitName (m :: Metricality) where
#

The name of a unit.

Instances4Eq, Show, NFData, HasInterchangeName
  • Eq (UnitName m)Defined in dimensional-1.5 · Numeric.Units.Dimensional.UnitNames.Internal
  • Show (UnitName m)Defined in dimensional-1.5 · Numeric.Units.Dimensional.UnitNames.Internal

    UnitNames are shown with non-breaking spaces.

  • NFData (UnitName m)Defined in dimensional-1.5 · Numeric.Units.Dimensional.UnitNames.Internal
  • HasInterchangeName (UnitName m)Defined in dimensional-1.5 · Numeric.Units.Dimensional.UnitNames.Internal
datadata NameAtom (m :: NameAtomType)
#

Represents the name of an atomic unit or prefix.

Instances7Eq, Data, Ord, Generic, NFData, HasInterchangeName, …
datadata Prefix
#

A metric prefix.

Instances7Eq, Data, Ord, Generic, NFData, HasInterchangeName, …
datadata Metricality
#

Encodes whether a unit is a metric unit, that is, whether it can be combined with a metric prefix to form a related unit.

Constructors

  • Metric

    Capable of receiving a metric prefix.

  • NonMetric

    Incapable of receiving a metric prefix.

Instances6Eq, Data, Ord, Generic, NFData, Rep

Construction of Unit Names

8 declarations
valueatom
  1. :: String

    Interchange name

  2. -> String

    Abbreviated name in international English

  3. -> String

    Full name in international English

  4. -> UnitName 'NonMetric
#

Constructs an atomic name for a custom unit.

Standard Names

3 declarations

Inspecting Prefixes

2 declarations

Convenience Type Synonyms for Unit Name Transformations

2 declarations

Forgetting Unwanted Phantom Types

6 declarations