Document Type

Article

Publication Title

ACM SIGPLAN Notices - Haskell '14

Volume

49

Publication Date

12-2014

Abstract

Many of the bugs in scientific programs have their roots in mis- treatment 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 di- mensions and units, a notion of dimensions apart from that of units, and unit polymorphism designed to describe the laws of physics. We demonstrate the utility of units by writing an astrophysics re- search paper. This work is free of unit concerns because every quantity expression in the paper is rigorously type-checked.

DOI

http://doi.acm.org/10.1145/2775050.2633362

Share

COinS