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

[ bsd3, chemistry, library, math, physics, science ] [ Propose Tags ]
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 Thu Oct 29 18:00:51 UTC 2015
Distributions NixOS:
Downloads 862 total (11 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-11-30 [all 4 reports]
Hackage Matrix CI

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'


  • Science
    • Constants
      • Science.Constants.Dimensional
        • Science.Constants.Dimensional.Private
        • Science.Constants.Dimensional.Short


Maintainer's Corner

For package maintainers and hackage trustees