Skip to content

Haskell LLVM Kaleidoscope Tutorial

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-LLVM
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

thekafkaf/kaleidoscope

 
 

Repository files navigation

Haskell Kaleidoscope Tutorial http://www.stephendiehl.com/llvm

This is an open source project, patches and corrections always welcome.

Build Status

Installing with Nix

The easiest way (if you are currently using Nix package manager or NixOS) is to install all dependencies, both Haskell and system libraries, is to use the default.nix configuration provided. From the source directory simply run:

$ nix-shell

This will install binary packages for all dependencies including ghc, llvm, haskeline and llvm-general in a self-contained environment that is very likely to work out of the box.

Installing with Cabal

Install the dependencies:

$ cabal sandbox init

If you just want to compile the examples then configure with the following command. Ensure that llvm-config is on your $PATH.

$ cabal configure

If you want to build the tutorial text locally configure with the following. This will install pandoc from source which will take a while.

$ cabal configure --flags=tutorial

Then install the dependencies:

$ cabal install --only-dependencies

Source Code

The source code for the example compiler of each chapter is included in the /src folder. With the dependencies installed these can be built using the Makefile at the root level or with cabal.

$ cabal run chapter2
$ cabal run chapter6
$ make chapter2
$ make chapter6

Editing

To generate the HTML page:

$ make tutorial.html

A standalone PDF can also be generated with:

$ make tutorial.pdf

License

LLVM + MIT License

About

Haskell LLVM Kaleidoscope Tutorial

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-LLVM
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 93.8%
  • CSS 2.9%
  • Makefile 1.4%
  • C 1.1%
  • Other 0.8%