@hackage ghc-typelits-extra0.1.2

Additional type-level operations on GHC.TypeLits.Nat

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

  • GHC.TypeLits.Extra.GCD: a type-level gcd

  • GHC.TypeLits.Extra.CLog: type-level equivalent of "clog x y = ceiling (logBase x y)"

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.