units

The units package provides a mechanism for compile-time dimensional analysis in Haskell programs. It defines an embedded type system based on units-of-measure. The units defined are fully extensible, and need not relate to physical properties. The package supports defining multiple inter-convertible units, such as Meter and Foot. When extracting a number from a dimensioned quantity, the desired unit must be specified, and the value is converted into that unit. If you are looking for specific systems of units (such as SI), please see the units-defs package. Tests for this package are in a companion package units-test, available from this package's source repository. The Haddock documentation is insufficient for using the units package. Please see the README file, available from the package home page.


Keywords
library, math, Propose Tags, Skip to Readme, , Index, Quick Jump, Data.Metrology, Data.Metrology.Internal, Data.Metrology.Linear, Data.Metrology.Parser, Data.Metrology.Poly, Data.Metrology.Quantity, Data.Metrology.Set, Data.Metrology.Show, Data.Metrology.TH, Data.Metrology.Unsafe, Data.Metrology.Vector, Data.Metrology.Z, units-2.4.1.5.tar.gz, browse, Package description, Package maintainers, RichardEisenberg, edit package information , this test case, units-defs, here
License
BSD-3-Clause
Install
cabal install units-2.4.1.5

Documentation

units

This repo is the home of the units package for Haskell, which provides a mechanism for compile-time dimensional analysis. There are two components of this project, units and units-defs. The units package implements all the type-level machinery for dimensional analysis, but it is completely agnostic to the actual system of units used. Separately, the units-defs package (which depends on units) defines commonly used units, including implementing the SI (Système Internationale) system of units.

Look at the README for units for more info.