소개
The LLVM LHC Haskell Optimization System
프로그래밍 언어 및 런타임측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalAbout LHC
The LHC Haskell Compiler aims at compiling Haskell2010 to LLVM IR using the HaskellSuite of libraries.
Getting started
LHC is built by stack:
stack setup
stack build
stack exec lhc
Installing the lhc-prim library is required before the example programs can be compiled.
stack install cabal-install
stack exec -- cabal update
(cd packages/lhc-prim/ && stack exec -- cabal install --haskell-suite -w `stack exec -- which lhc`)
After lhc-prim has been installed, all the programs in examples/ will be
compilable:
stack exec -- lhc build examples/HelloWorld.hs
lli examples/HelloWorld.ll
You can run lhc with the --keep-intermediate-files flag to inspect the
various stages of the transformation from bedrock to llvm.
stack exec -- lhc build --verbose --keep-intermediate-files examples/HelloWorld.hs
Testing
Running the test suite is done via stack:
stack test && cat .stack-work/logs/lhc-*-test.log
Status (updated 2018-05-26)
LHC is comprised of separate libraries which are developed independenly and are in various states of completion.
haskell-scope
Haskell-scope implements name resolution for a sizable subset of Haskell2010 but it's far from complete. So far it hasn't proved a bottleneck.
haskell-tc
Haskell-tc implements type-checking and type-inference for a small subset of Haskell2010. Only the constructs used in the example programs are supported.
haskell-crux
Haskell-crux is responsible for desugaring and, like haskell-tc, has only been defined for exactly those language constructs which are currently used by the example programs.
base library
The base is extremely minimal and functions are implemented on a by-need basis.
Integer support
None. Will eventually write a minimal implementation in either Haskell or C.
Exceptions
Not implemented yet but the RTS has been designed with exceptions in mind.
Garbage collection
LHC has a simple but accurate semispace garbage collector.
Threading
Not supported. Will eventually use libuv.
Unicode support
Not supported. Will eventually use libicu.
Compilation pipeline and the relevant libraries:
┌──────────────────┐
│ Parsing │
│ haskell-src-exts │
└────────┬─────────┘
┌────────┴────────┐
│ Name resolution │
│ haskell-scope │
└────────┬────────┘
┌───────┴───────┐
│ Type-checking │
│ haskell-tc │
└───────┬───────┘
┌──────┴───────┐
│ Desugaring │
│ haskell-crux │
└──────┬───────┘
┌────────┴────────┐
│ Optimizing Core │
│ LHC │
└────────┬────────┘
┌────┴────┐
│ Bedrock │
│ bedrock │
└────┬────┘
┌───────┴───────┐
│ Generate LLVM │
│ bedrock │
└───────────────┘
관련 프로젝트 살펴보기
불러오는 중…