kempe: Kempe compiler

[ bsd3, compilers, language, library, program ] [ Propose Tags ] [ Report a vulnerability ]

Kempe is a stack-based language


[Skip to Readme]

library kempe:kempe-modules

Modules

[Last Documentation]

  • Kempe
    • Kempe.AST
    • Asm
      • Arm
        • Kempe.Asm.Arm.ControlFlow
        • Kempe.Asm.Arm.Linear
        • Kempe.Asm.Arm.Trans
      • Kempe.Asm.Liveness
      • X86
        • Kempe.Asm.X86.ControlFlow
        • Kempe.Asm.X86.Linear
        • Kempe.Asm.X86.Trans
    • Check
      • Kempe.Check.Pattern
    • Kempe.File
    • Kempe.IR
      • Kempe.IR.Opt
    • Kempe.Inline
    • Kempe.Lexer
    • Kempe.Module
    • Kempe.Monomorphize
    • Kempe.Parser
    • Kempe.Pipeline
    • Kempe.Shuttle
    • Kempe.TyAssign
  • Language
    • C
      • Language.C.AST

Flags

Manual Flags

NameDescriptionDefault
cross

Enable to ease cross-compiling

Disabled

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.1.3, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.2.0.5, 0.2.0.6, 0.2.0.7, 0.2.0.8, 0.2.0.9, 0.2.0.10, 0.2.0.11, 0.2.0.12, 0.2.0.13, 0.2.0.14
Change log CHANGELOG.md
Dependencies array, base (>=4.19 && <5), bytestring, composition-prelude (>=2.0.2.0), containers (>=0.6.0.0), deepseq, kempe, microlens, microlens-mtl (>=0.1.8.0), mtl, optparse-applicative, prettyprinter (>=1.7.0), process (>=1.2.3.0), temporary, text, transformers [details]
License BSD-3-Clause
Copyright Copyright: (c) 2020-2022 Vanessa McHale
Author Vanessa McHale
Maintainer vamchale@gmail.com
Category Language, Compilers
Source repo head: git clone https://github.com/vmchale/kempe
Uploaded by vmchale at 2024-05-29T03:54:25Z
Distributions
Executables kc
Downloads 3533 total (7 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-0.2.0.14

[back to package description]

Kempe

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

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)"

Defects

  • 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

Comparison

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