science-constants-dimensional: Mathematical/physical/chemical constants

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]


Science.Constants.Dimensional is a variant of Science.Constants[1] package, with the only difference is that that the dimensional flavor provides (where applicable) dimensionally-typed constants. The Numeric.Units.Dimensional[2] wrappers allow to write type-safe formulas, for example all of this will successfully type-check:

~$ ghci -XNoImplicitPrelude
λ= import Numeric.Units.Dimensional.Prelude

λ= import Science.Constants.Dimensional

λ= massOfProton + massOfElectron

1.673532715291e-27 kg
λ= massOfProton / massOfElectron


But this will not:

λ= massOfProton / massOfElectron + planckConstant

    Couldn't match type `Numeric.NumType.Pos
                           (Numeric.NumType.Pos Numeric.NumType.Zero)'
                  with `Numeric.NumType.Zero'


Change log None available
Dependencies base (>=4.6 && <4.9), dimensional (<0.14), numtype, science-constants (>=0.2) [details]
License BSD-3-Clause
Author Anton Vorontsov <>
Maintainer Anton Vorontsov <>
Category Science, Math, Physics, Chemistry
Source repo head: darcs get
Uploaded by cbou at 2015-10-29T17:59:50Z



Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees