The ghc-typelits-extra package

[ Tags: bsd2, library, type-system ] [ Propose Tags ]

Additional type-level operations on GHC.TypeLits.Nat:

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]

Properties

Versions 0.1, 0.1.1, 0.1.2, 0.1.3, 0.2, 0.2.1, 0.2.2, 0.2.3
Change log CHANGELOG.md
Dependencies base (>=4.8 && <5), ghc (>=7.10 && <8.2), ghc-tcplugins-extra (>=0.2), ghc-typelits-knownnat (==0.2.*), ghc-typelits-natnormalise (==0.5.*), integer-gmp (==1.0.*), singletons (>=2.2 && <3), transformers (>=0.4.2.0 && <0.6) [details]
License BSD2
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 repository head: git clone https://github.com/clash-lang/ghc-typelits-extra.git
Uploaded Fri Aug 19 08:51:01 UTC 2016 by ChristiaanBaaij
Updated Fri Aug 19 09:51:02 UTC 2016 by ChristiaanBaaij to revision 1   [What is this?]
Distributions LTSHaskell:0.2.3, NixOS:0.2.3, Stackage:0.2.3, Tumbleweed:0.2.3
Downloads 1178 total (213 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

Modules

[Index]

Flags

NameDescriptionDefaultType
deverror

Enables -Werror for development mode and TravisCI

DisabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for ghc-typelits-extra-0.2

[back to package description]

ghc-typelits-extra

Build Status Hackage Hackage Dependencies

Extra type-level operations on GHC.TypeLits.Nat and a custom solver implemented as a GHC type-checker plugin:

  • GHC.TypeLits.Extra.Max: type-level max
  • GHC.TypeLits.Extra.Min: type-level min
  • GHC.TypeLits.Extra.Div: type-level div
  • GHC.TypeLits.Extra.Mod: type-level mod
  • GHC.TypeLits.Extra.FLog: type-level equivalent of integerLogBase# .i.e. the exact integer equivalent to "floor (logBase x y)"
  • GHC.TypeLits.Extra.CLog: type-level equivalent of the ceiling of integerLogBase# .i.e. the exact integer equivalent to "ceiling (logBase x y)"
  • 'GHC.TypeLits.Extra.Log': type-level equivalent of <https://hackage.haskell.org/package/integer-gmp/docs/GHC-Integer-Logarithms.html#v:integerLogBase-35- integerLogBase#> where the operation only reduces when "floor (logBase b x) ~ ceiling (logBase b x)"
  • GHC.TypeLits.Extra.GCD: a type-level gcd
  • GHC.TypeLits.Extra.LCM: a type-level lcm