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

1836.1526719486646

But this will not:

λ= massOfProton / massOfElectron + planckConstant

<interactive>:10:14:
    Couldn't match type `Numeric.NumType.Pos
                           (Numeric.NumType.Pos Numeric.NumType.Zero)'
                  with `Numeric.NumType.Zero'
1
https://hackage.haskell.org/package/science-constants
2
https://hackage.haskell.org/package/dimensional

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3
Dependencies base (>=4.6 && <4.7), dimensional, numtype, science-constants (>=0.2) [details]
License BSD-3-Clause
Author Anton Vorontsov <anton@enomsg.org>
Maintainer Anton Vorontsov <anton@enomsg.org>
Category Science, Math, Physics, Chemistry
Source repo head: darcs get http://code.haskell.org/science-constants-dimensional
Uploaded by cbou at 2014-09-15T22:20:38Z
Distributions NixOS:0.1.0.3
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2417 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]