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

[ bsd3, chemistry, library, math, physics, science ] [ Propose Tags ]

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'


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,
Dependencies base (>=4.6 && <5), dimensional (<=1.3), numtype-dk, science-constants (>=0.2) [details]
License BSD-3-Clause
Author Anton Vorontsov <>
Maintainer Anton Vorontsov <>
Category Science, Math, Physics, Chemistry
Source repo head: git clone
Uploaded by cbou at 2020-01-13T11:39:50Z
Distributions NixOS:
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2482 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-01-13 [all 1 reports]