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

This module defines physical dimensions expressed in terms of the SI base dimensions, including arithmetic.

  • 2 types
  • 2 classes
  • 19 values
  • BangPatterns
  • DeriveDataTypeable
  • DeriveGeneric
  • DefaultSignatures
  • Packagedimensional-1.5
  • Exports23
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTermLevel.hs

Type

1 declaration
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, …

Access to Dimension of Dimensional Values

3 declarations
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, …

Dimension Arithmetic

7 declarations
valuenroot :: Int -> Dimension' -> Maybe Dimension'
#

Takes the nth root of a dimension, if it exists.

n must not be zero.

Property
nroot (negate n) d == nroot n (recip d)

Synonyms for Base Dimensions

8 declarations

Deconstruction

1 declaration
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.

Examining Dynamic Dimensions

3 declarations