This repository is a Haskell port of the classic LLVM “Kaleidoscope” tutorial that walks you through building a tiny programming language from scratch. It covers the complete pipeline: tokenizing and parsing a simple, expression-oriented language, constructing an AST, and generating LLVM IR with a JIT so you can execute code interactively. Along the way it adds language features like user-defined functions, conditionals, loops, and operator precedence, demonstrating how each addition impacts parsing and codegen. Because it uses Haskell idioms, the code clearly separates pure syntax handling from effectful JIT operations, making the architecture easy to reason about. The examples double as a hands-on introduction to LLVM’s APIs without drowning you in infrastructure. As a result, the project is both a compact compiler course and a practical template for experimenting with language design in Haskell.

Features

  • Simple parser / lexer for the language grammar
  • AST representation and semantic analysis
  • Expression evaluation with variables, functions, control flow
  • Integration with LLVM IR emission
  • JIT compilation and execution via LLVM engine
  • Examples and tutorial code demonstrating incremental compiler design

Project Samples

Project Activity

See All Activity >

Categories

Education

License

MIT License

Follow Kaleidoscope

Kaleidoscope Web Site

Other Useful Business Software
Rezku Point of Sale Icon
Rezku Point of Sale

Designed for Real-World Restaurant Operations

Rezku is an all-inclusive ordering platform and management solution for all types of restaurant and bar concepts. You can now get a fully custom branded downloadable smartphone ordering app for your restaurant exclusively from Rezku.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Kaleidoscope!

Additional Project Details

Programming Language

Haskell

Related Categories

Haskell Education Software

Registered

2025-09-26