kempe: Kempe compiler

[ bsd3, compilers, language, library, program ] [ Propose Tags ]

Kempe is a stack-based language

[Skip to Readme]


Manual Flags


Enable to ease cross-compiling


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


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,,,,,,,,,,,,,,,,,,,
Change log
Dependencies array, base (>=4.19 && <5), bytestring, composition-prelude (>=, containers (>=, deepseq, kempe, microlens, microlens-mtl (>=, mtl, optparse-applicative, prettyprinter (>=1.7.0), process (>=, temporary, text, transformers [details]
License BSD-3-Clause
Copyright Copyright: (c) 2020-2022 Vanessa McHale
Author Vanessa McHale
Category Language, Compilers
Source repo head: git clone
Uploaded by vmchale at 2024-05-29T03:54:25Z
Executables kc
Downloads 3292 total (36 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2024-05-29 [all 2 reports]

Readme for kempe-

[back to package description]


Kempe is a stack-based language and toy compiler for x86_64 and aarch64. It requires the nasm assembler when targeting x86_64.

Inspiration is primarily from Mirth.

See manual here. There is also a tour of the compiler available here.


Installation is via cabal-install:

cabal install kempe

For shell completions put the following in your ~/.bashrc or ~/.bash_profile:

eval "$(kc --bash-completion-script kc)"


  • Errors don't have position information

  • Monomorphization fails on recursive polymorphic functions

    Hopefully this isn't too sinful; I can't think of any examples of recursive polymorphic functions

  • Can't export or call C functions with more than 6 arguments; can't call or export large arguments (i.e. structs) passed by value.

    This is less of an impediment than it sounds like.

  • Cyclic imports are not detected

  • Imports are kind of defective


You may wish to use Mirth or Factor instead. Mirth is statically typed (similar to Kempe) but less mature.