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
Ship Agents Faster Icon
Ship Agents Faster

Transform your applications and workflows into powerful agentic systems at global scale.

Gemini Enterprise Agent Platform lets you rapidly build, scale, govern and optimize production-ready agents grounded in your organization's data. The platform enables developers to build custom or pre-built agents for virtually any use case. New customers get $300 in free credits.
Get Started Free
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