Skip to content
Extra type-level operations on GHC.TypeLits.Nat and a custom solver
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/GHC/TypeLits Fix fallout from `isNatural` changes Jun 6, 2019
tests
.gitignore
.travis.yml
CHANGELOG.md
HACKING.md
LICENSE
README.md
Setup.hs
cabal.project
ghc-typelits-extra.cabal

README.md

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
You can’t perform that action at this time.