Giter Site home page Giter Site logo

a8e5 / jhc-components Goto Github PK

View Code? Open in Web Editor NEW

This project forked from csabahruska/jhc-components

0.0 0.0 0.0 792 KB

JHC Haskell compiler split into reusable components

License: MIT License

C 6.36% Haskell 93.05% Shell 0.06% M4 0.44% C++ 0.03% Objective-C 0.06%

jhc-components's Introduction

JHC Haskell Compiler

This is a fork of JHC Haskell Compiler 0.8.2.

The source code is split into reusable components and builds with Haskell Stack.

Components

  • jhc-compat: Haskell98 compatibility library
  • jhc-common: Compiler foundation library
  • jhc-frontend: Haskell Front-End, lexer, parser, type-checker
  • jhc-core: Core language, based on Pure Type System
  • jhc-grin: Backend, C code generator, whole program optimizer, variant of GRIN intermediate language
  • jhc-app: JHC Compiler, command line interface

NOTE: lib contains the standard Haskell libraries for JHC

System Requirements

Compile & Run

Stack

The instructions below are for Haskell Stack.

stack setup
stack build
stack exec -- jhc --help

To compile the standard libraries run:

stack exec -- jhc -L . --build-hl  lib/jhc-prim/jhc-prim.yaml
stack exec -- jhc -L . --build-hl  lib/jhc/jhc.yaml
stack exec -- jhc -L . --build-hl  lib/haskell-extras/haskell-extras.yaml
stack exec -- jhc -L . --build-hl  lib/haskell2010/haskell2010.yaml
stack exec -- jhc -L . --build-hl  lib/haskell98/haskell98.yaml
stack exec -- jhc -L . --build-hl  lib/applicative/applicative.yaml
stack exec -- jhc -L . --build-hl  lib/flat-foreign/flat-foreign.yaml

To compile the examples run:

stack exec -- jhc -L . examples/Calendar.hs -o calendar
stack exec -- jhc -L . examples/HelloWorld.hs -o hello
stack exec -- jhc -L . examples/Primes.hs -o primes

Cabal

The instructions below are for Haskell Cabal version 2.4.1 or later.

To (re)compile and run jhc from within the source-tree, simply invoke

cabal v2-run jhc -- --help

To compile the standard libraries run:

cabal v2-run jhc -- -L . --build-hl  lib/jhc-prim/jhc-prim.yaml
cabal v2-run jhc -- -L . --build-hl  lib/jhc/jhc.yaml
cabal v2-run jhc -- -L . --build-hl  lib/haskell-extras/haskell-extras.yaml
cabal v2-run jhc -- -L . --build-hl  lib/haskell2010/haskell2010.yaml
cabal v2-run jhc -- -L . --build-hl  lib/haskell98/haskell98.yaml
cabal v2-run jhc -- -L . --build-hl  lib/applicative/applicative.yaml
cabal v2-run jhc -- -L . --build-hl  lib/flat-foreign/flat-foreign.yaml

To compile the examples run:

cabal v2-run jhc -- -L . examples/Calendar.hs -o calendar
cabal v2-run jhc -- -L . examples/HelloWorld.hs -o hello
cabal v2-run jhc -- -L . examples/Primes.hs -o primes

Development Ideas

Check the list of development ideas.

jhc-components's People

Contributors

csabahruska avatar hvr avatar

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.