cabal-version: 2.4
name: significant-figures
version: 0.1.0.0
synopsis: Calculate expressions involving significant figures.
description: This library provides a module "Data.SigFig" that helps with the parsing and evaluation of expressions involving significant figures. Significant figures are a method, often used in chemistry, of assessing and controlling the precision/uncertainty from measured values in calculations.
.
Expressions with significant figures are __not easily calculable__ with a normal calculator, since they require intermediate rounding based on the rules governing significant figures. This library takes care of not only the intermediate rounding during evaluation, but also provides functions to parse text into expressions.
.
Parsing supports integer, float, and scientific notation (via E notation), constant terms (terms with effectively infinite significant figures), common operations, parentheses, and an additional small set of functions. Expressions can also be constructed via helper functions.
.
Evaluation takes care of rounding when dealing with expressions involving either/both of constant and measured terms. A few functions, however, such as @log()@, are unsupported on constant arguments, since with the current implementation it is impractical to store such a value that has theoretical infinite significant figures.
bug-reports: https://github.com/mizlan/significant-figures/issues
license: GPL-3.0-or-later
license-file: LICENSE
author: Michael Lan
maintainer: michaellan202@gmail.com
category: Chemistry
,Math
extra-source-files: CHANGELOG.md
library
default-language: Haskell2010
hs-source-dirs: src
exposed-modules: Data.SigFig
,Data.SigFig.Interface
,Data.SigFig.Evaluate
,Data.SigFig.Parse
,Data.SigFig.Types
,Data.SigFig.Util
other-extensions: OverloadedStrings
,BlockArguments
,ImportQualifiedPost
build-depends: base >=4.14.3.0 && <5
,text >=1.2 && <3
,parsec >=3.1 && <4
,HasBigDecimal ^>=0.2.0.0
executable significant-figures-cli
default-language: Haskell2010
hs-source-dirs: app
main-is: Main.hs
build-depends: base
,text
,parsec
,HasBigDecimal
,haskeline >=0.8.1.3
,significant-figures
if !os(windows) {
build-depends: terminfo >=0.4.1.5
}
test-suite significant-figures-test
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: SigFigTest.hs
build-depends: base
,text
,tasty ^>=1.4.2.3
,tasty-hunit
,HUnit
,HasBigDecimal
,significant-figures