[Haskell-cafe] GSoC proposal: Units for GHC

Roel van Dijk vandijk.roel at gmail.com
Wed Apr 4 16:19:46 CEST 2012

2012/4/4 Richard Eisenberg <eir at seas.upenn.edu>:
> - A first crack at units in Haskell has already been done (by Bjorn
> Buckwalter) and made public at http://code.google.com/p/dimensional/
> This implementation uses functional dependencies heavily and is restricted
> to only a specific 7 units.

I am a happy user of the type family variant of the dimensional
package [1]. It can represent all possible dimensions in the type
system by encoding them as powers of 7 base dimensions. It supports
all SI units and a few non-SI units. One of the limitations of this
approach is that you can not make a distinction between absolute and
relative units (degree Celsius vs Kelvin). I found the wikipedia page
on dimensional analysis [2] to present a good overview of the problem

I share Gregory Collins' question on how your work would differ from
the dimensional package, or what it would add.

1 - https://github.com/bjornbm/dimensional-tf
2 - http://en.wikipedia.org/wiki/Dimensional_analysis

More information about the Glasgow-haskell-users mailing list