ghc-typelits-extra: Additional type-level operations on GHC.TypeLits.Nat
Additional type-level operations on GHC.TypeLits.Nat:
Max: type-level maxMin: type-level minDiv: type-level divMod: type-level modFLog: type-level equivalent of integerLogBase# i.e. the exact integer equivalent tofloor (logBase x y)CLog: type-level equivalent of the ceiling of integerLogBase# i.e. the exact integer equivalent toceiling (logBase x y)Log: type-level equivalent of integerLogBase# where the operation only reduces whenfloor (logBase b x) ~ ceiling (logBase b x)GCD: a type-level gcdLCM: a type-level lcm
And a custom solver for the above operations defined in
GHC.TypeLits.Extra.Solver as a GHC type-checker plugin. To use the plugin,
add the
OPTIONS_GHC -fplugin GHC.TypeLits.Extra.Solver
pragma to the header of your file.
[Skip to Readme]
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| deverror | Enables `-Werror` for development mode and TravisCI | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- ghc-typelits-extra-0.2.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1, 0.1.1, 0.1.2, 0.1.3, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.5.0, 0.5.1 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.8 && <5), ghc (>=7.10 && <8.2), ghc-tcplugins-extra (>=0.2), ghc-typelits-knownnat (>=0.2 && <0.3), ghc-typelits-natnormalise (>=0.5 && <0.6), integer-gmp (>=1.0 && <1.1), singletons (>=2.2 && <3), transformers (>=0.4.2.0 && <0.6) [details] |
| License | BSD-2-Clause |
| Copyright | Copyright © 2015-2016 University of Twente |
| Author | Christiaan Baaij |
| Maintainer | christiaan.baaij@gmail.com |
| Category | Type System |
| Home page | http://www.clash-lang.org/ |
| Bug tracker | http://github.com/clash-lang/ghc-typelits-extra/issues |
| Source repo | head: git clone https://github.com/clash-lang/ghc-typelits-extra.git |
| Uploaded | by ChristiaanBaaij at 2016-09-29T14:04:51Z |
| Distributions | Arch:0.4.8, LTSHaskell:0.4.8, NixOS:0.4.8, Stackage:0.5.1 |
| Reverse Dependencies | 11 direct, 15 indirect [details] |
| Downloads | 19347 total (73 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs uploaded by user Build status unknown [no reports yet] |