• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

csabahruska/jhc-components: JHC Haskell compiler split into reusable components

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

csabahruska/jhc-components

开源软件地址(OpenSource Url):

https://github.com/csabahruska/jhc-components

开源编程语言(OpenSource Language):

Haskell 93.0%

开源软件介绍(OpenSource 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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap