Skip to content

adamgundry/uom-plugin

Repository files navigation

Units of measure as a GHC type-checker plugin

⚠️ This library is experimental, and may lead to unexpected type-checking failures or even type soundness bugs.

The uom-plugin library adds support for units of measure as a GHC type-checker plugin. See Data.UnitsOfMeasure.Tutorial for an introduction to the library, and the accompanying paper for more background. An example of a package that uses the library is given in uom-plugin-examples.

The latest version of the library is tested with GHC 9.0 to 9.4. Older versions of uom-plugin (0.3 and earlier) work with the GHC 7.10, 8.0 and 8.2 series. There are no versions supporting GHC 8.4 to 8.10 (#43). Running cabal haddock on this library requires GHC 9.4 (see #66).

Installation

> git clone https://github.com/adamgundry/uom-plugin.git
> cd uom-plugin
> cabal new-build all
> cabal new-run Examples

Continuous Integration

Build Status

Generate the .github/worksflows/haskell-ci.yml setup with:

> haskell-ci github cabal.project --local-ghc-options -dcore-lint

About

Units of measure as a GHC typechecker plugin

Resources

Stars

Watchers

Forks

Packages

No packages published