HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduledimensional-1.5Haskell2010

Numeric.Units.Dimensional.Dimensions

Provides both term-level and type-level representations for physical dimensions in a single import for convenience.

Presuming that users intend to work primarily with type level dimensions, this module hides arithmetic operators over term level dimensions and aliases for the base term-level dimensions to avoid namespace pollution. These features are available directly from Numeric.Units.Dimensional.Dimensions.TermLevel if desired.

  • 2 types
  • 2 classes
  • 5 values
  • Packagedimensional-1.5
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceDimensions.hs
datadata Dimension'
#

A physical dimension, encoded as 7 integers, representing a factorization of the dimension into the 7 SI base dimensions. By convention they are stored in the same order as in the Dimension data kind.

Constructors

Instances11Eq, Data, Ord, Show, Generic, Semigroup, …
classclass HasDynamicDimension a => HasDimension a where
#

Dimensional values inhabit this class, which allows access to a term-level representation of their dimension.

Methods

Instances5HasDimension
classclass HasDynamicDimension a where
#

Dimensional values, or those that are only possibly dimensional, inhabit this class, which allows access to a term-level representation of their dimension.

Methods

Instances7HasDynamicDimension, …
datadata DynamicDimension
#

The dimension of a dynamic value, which may not have any dimension at all.

Constructors

Instances8Eq, Data, Ord, Show, Generic, NFData, …
valueasList :: Dimension' -> [Int]
#

Converts a dimension to a list of 7 integers, representing the exponent associated with each of the 7 SI base dimensions in the standard order.