GithubHelp home page GithubHelp logo

jrp2014 / llvm-hs-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from llvm-hs/llvm-hs-examples

0.0 0.0 0.0 58 KB

Examples for Haskell bindings to LLVM

License: MIT License

Haskell 100.00%

llvm-hs-examples's Introduction

LLVM Haskell Examples

Build Status

Simple examples demonstrating the usage of the llvm-hs for generating and manipulating LLVM from Haskell.

  • basic - Generating LLVM AST and rendering Textual IR
  • orc - JIT Compiling IR on the Eager and Lazy ORC Jit using Compile-On-Demand
  • arith - a minimal JIT compiler for functions of one (real) variable using recursion schemes
  • irbuilder - Basic usage of the LLVM IRBuilder for constructing modules

These examples require LLVM 9.0. Check that your installed LLVM version is precisely 9.0. If not then follow the install directions in the llvm-hs repository.

$ llvm-config --version
9.0

To run the examples with Stack:

$ stack exec basic
$ stack exec orc
$ stack exec arith
$ stack exec irbuilder

To load the examples in GHCI:

$ stack repl examples:basic
$ stack repl examples:orc
$ stack repl examples:arith
$ stack repl examples:irbuilder

To run the examples with Cabal:

$ cabal run basic
$ cabal run orc
$ cabal run arith
$ cabal run irbuilder

License

MIT License Copyright (c) 2017-2020, Stephen Diehl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.