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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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