ghc-typelits-extra
Version 0.4.7 revision 0 uploaded by ChristiaanBaaij.
Package meta
- Synopsis
- Additional type-level operations on GHC.TypeLits.Nat
- Description
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 theOPTIONS_GHC -fplugin GHC.TypeLits.Extra.Solver
pragma to the header of your file.
- Author
- Christiaan Baaij
- Bug reports
- http://github.com/clash-lang/ghc-typelits-extra/issues
- Category
- Type System
- Copyright
- Copyright © 2015-2016, University of Twente, 2017-2018, QBayLogic B.V.
- Homepage
- http://www.clash-lang.org/
- Maintainer
- christiaan.baaij@gmail.com
- Package URL
- n/a
- Stability
- n/a