Proceedings of the 2014 ACM SIGPLAN Symposium on Haskell 2014
DOI: 10.1145/2633357.2633362
|View full text |Cite
|
Sign up to set email alerts
|

Experience report

Abstract: Many of the bugs in scientific programs have their roots in mistreatment of physical dimensions, via erroneous expressions in the quantity calculus. Now that the type system in the Glasgow Haskell Compiler is rich enough to support type-level integers and other promoted datatypes, we can type-check the quantity calculus in Haskell. In addition to basic dimension-aware arithmetic and unit conversions, our units library features an extensible system of dimensions and units, a notion of dimensions apart from that… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2

Citation Types

0
2
0

Year Published

2014
2014
2023
2023

Publication Types

Select...
4
3

Relationship

3
4

Authors

Journals

citations
Cited by 12 publications
(2 citation statements)
references
References 16 publications
0
2
0
Order By: Relevance
“…• Microsoft's F# [5] has units of measure built-in to static type checking; • C++'s Boost Units library [6] uses templates to check units statically; • Java has a proposed API adding classes for dimensioned quantities [7], but run-time casts are inevitable; • Haskell's type system can now encode basic units of measure as a library [8] or a typechecker plugin [9]; • Python libraries such as Pint [10] cannot do static checking of dimensional correctness, but implement runtime checks instead. Similarly, MATLAB has support for dynamic unit checking using the Symbolic Math Toolbox [11].…”
Section: Units Of Measure Using Typesmentioning
confidence: 99%
“…• Microsoft's F# [5] has units of measure built-in to static type checking; • C++'s Boost Units library [6] uses templates to check units statically; • Java has a proposed API adding classes for dimensioned quantities [7], but run-time casts are inevitable; • Haskell's type system can now encode basic units of measure as a library [8] or a typechecker plugin [9]; • Python libraries such as Pint [10] cannot do static checking of dimensional correctness, but implement runtime checks instead. Similarly, MATLAB has support for dynamic unit checking using the Symbolic Math Toolbox [11].…”
Section: Units Of Measure Using Typesmentioning
confidence: 99%
“…• Haskell's type system can now encode basic units of measure as a library [ME14] or a typechecker plugin [Gun15];…”
Section: Units Of Measure Using Typesmentioning
confidence: 99%