The science-constants-dimensional package

[Tags:bsd3, library]

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

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.2
Dependencies base (>=4.6 && <4.9), dimensional (<0.14), numtype, science-constants (>=0.2) [details]
License BSD3
Author Anton Vorontsov <anton@enomsg.org>
Maintainer Anton Vorontsov <anton@enomsg.org>
Stability Unknown
Category Science, Math, Physics, Chemistry
Source repository head: darcs get http://code.haskell.org/science-constants-dimensional
Uploaded Thu Oct 29 18:00:51 UTC 2015 by cbou
Distributions NixOS:0.1.0.2
Downloads 447 total (7 in the last 30 days)
Votes
0 []
Status Docs not available [build log]
All reported builds failed as of 2016-11-30 [all 4 reports]

Modules

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

Downloads

Maintainer's Corner

For package maintainers and hackage trustees