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 maxGHC.TypeLits.Extra.Min
: type-level minGHC.TypeLits.Extra.Div
: type-level divGHC.TypeLits.Extra.Mod
: type-level modGHC.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)
"floor (logBase b x) ~ ceiling (logBase b x)
"GHC.TypeLits.Extra.GCD
: a type-level gcdGHC.TypeLits.Extra.LCM
: a type-level lcm