ajhc: Haskell compiler that produce binary through C language

[ compiler, gpl, library, program ] [ Propose Tags ] [ Report a vulnerability ]

Ajhc is a fork of jhc. The jhc is a haskell compiler which aims to produce the most efficient programs possible via whole program analysis and other optimizations.

The jhc is very minimalist in that it does not have a precompiled run time system, but rather generates what is needed as part of the compilation process. However, back ends do have specific run-time representations of data, which can be affected by things like the choice of garbage collector.

Perhaps you can get internal overview with following compile flow image:


[Skip to Readme]

Modules

[Last Documentation]

  • C
    • C.FFI
    • C.FromGrin2
    • C.Generate
    • C.Prims
  • Cmm
    • Cmm.Number
    • Cmm.Op
    • Cmm.OpEval
  • DataConstructors
  • DerivingDrift
    • DerivingDrift.DataP
    • DerivingDrift.Drift
    • DerivingDrift.RuleUtils
    • DerivingDrift.StandardRules
  • Doc
    • Doc.Attr
    • Doc.Chars
    • Doc.DocLike
    • Doc.PPrint
    • Doc.Pretty
  • E
    • E.Annotate
    • E.Arbitrary
    • E.Binary
    • E.CPR
    • E.Demand
    • E.Diff
    • E.E
    • E.Eta
    • E.Eval
    • E.FreeVars
    • E.FromHs
    • E.Inline
    • E.LambdaLift
    • E.LetFloat
    • E.Lint
    • E.Main
    • E.PrimDecode
    • E.PrimOpt
    • E.Program
    • E.Rules
    • E.SSimplify
    • E.Show
    • E.Subst
    • E.Traverse
    • E.Type
    • E.TypeAnalysis
    • E.TypeCheck
    • E.Values
    • E.WorkerWrapper
  • FindFixpoint
  • Fixer
    • Fixer.Fixer
    • Fixer.Supply
    • Fixer.VMap
  • FlagDump
  • FlagOpts
  • FrontEnd
    • FrontEnd.Class
    • FrontEnd.DataConsAssump
    • FrontEnd.DeclsDepends
    • FrontEnd.DependAnalysis
    • FrontEnd.Desugar
    • FrontEnd.Diagnostic
    • FrontEnd.Exports
    • FrontEnd.FrontEnd
    • FrontEnd.HsErrors
    • FrontEnd.HsParser
    • FrontEnd.HsPretty
    • FrontEnd.HsSyn
    • FrontEnd.Infix
    • FrontEnd.KindInfer
    • FrontEnd.Lexer
    • FrontEnd.ParseMonad
    • FrontEnd.ParseUtils
    • FrontEnd.Rename
    • FrontEnd.Representation
    • FrontEnd.SrcLoc
    • Syn
      • FrontEnd.Syn.Options
      • FrontEnd.Syn.Traverse
    • Tc
      • FrontEnd.Tc.Class
      • FrontEnd.Tc.Kind
      • FrontEnd.Tc.Main
      • FrontEnd.Tc.Module
      • FrontEnd.Tc.Monad
      • FrontEnd.Tc.Type
      • FrontEnd.Tc.Unify
    • FrontEnd.TypeSigs
    • FrontEnd.TypeSynonyms
    • FrontEnd.TypeSyns
    • FrontEnd.Unlit
    • FrontEnd.Utils
    • FrontEnd.Warning
  • GenUtil
  • Grin
    • Grin.DeadCode
    • Grin.Devolve
    • Grin.EvalInline
    • Grin.FromE
    • Grin.Grin
    • Grin.HashConst
    • Grin.Lint
    • Grin.Main
    • Grin.NodeAnalyze
    • Grin.Noodle
    • Grin.Optimize
    • Grin.SSimplify
    • Grin.Show
    • Grin.StorageAnalysis
    • Grin.Val
    • Grin.Whiz
  • Ho
    • Ho.Binary
    • Ho.Build
    • Ho.Collected
    • Ho.Library
    • Ho.ReadSource
    • Ho.Type
  • Info
    • Info.Binary
    • Info.Info
    • Info.Properties
    • Info.Types
  • Interactive
  • Name
    • Name.Binary
    • Name.Id
    • Name.Name
    • Name.Names
    • Name.Prim
    • Name.VConsts
  • Options
  • PackedString
  • RawFiles
  • Stats
  • StringTable
    • StringTable.Atom
  • Support
    • Support.CFF
    • Support.Cabal
    • Support.CanType
    • Support.Compat
    • Support.CompatMingw32
    • Support.FreeVars
    • Support.IniParse
    • Support.MD5
    • Support.MapBinaryInstance
    • Support.TempDir
    • Support.Tickle
    • Support.Transform
    • Support.Tuple
    • Support.Unparse
  • Util
    • Util.BitSet
    • Util.ContextMonad
    • Util.ExitCodes
    • Util.FilterInput
    • Util.GMap
    • Util.Gen
    • Util.Graph
    • Util.Graphviz
    • Util.HasSize
    • Util.Histogram
    • Util.Inst
    • Util.IntBag
    • Util.Interact
    • Util.NameMonad
    • Util.Once
    • Util.Perhaps
    • Util.Progress
    • Util.RWS
    • Util.ReaderWriter
    • Util.Relation
    • Util.SHA1
    • Util.SameShape
    • Util.Seq
    • Util.SetLike
    • Util.TrueSet
    • Util.UnionFind
    • Util.UnionSolve
    • Util.UniqueMonad
    • Util.Util
    • Util.VarName
    • Util.YAML
  • Version
    • Version.Config
    • Version.Version

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.8.0.1, 0.8.0.3, 0.8.0.4, 0.8.0.5, 0.8.0.6, 0.8.0.7, 0.8.0.8, 0.8.0.9, 0.8.0.10
Dependencies ajhc, array, base (>=4.0 && <5), binary, bytestring, containers, cpphs, directory, fgl, filepath, haskeline, HsSyck, HTTP, mtl, network, old-time, pretty, process, random, regex-compat, syb, temporary, unix, utf8-string, Win32, zlib [details]
License GPL-2.0-only
Author John Meacham <john@repetae.net>
Maintainer Metasepi team <metasepi@gmail.com>
Category Compiler
Home page http://ajhc.metasepi.org/
Bug tracker http://github.com/ajhc/ajhc/issues
Source repo head: git clone https://github.com/ajhc/ajhc.git
Uploaded by KiwamuOkabe at 2013-12-18T16:46:36Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables jahm, ajhc
Downloads 9456 total (9 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-10-26 [all 10 reports]

Readme for ajhc-0.8.0.10

[back to package description]

Ajhc - arafura-jhc

A fork of jhc. And also a Haskell compiler.

This project is founded by Metasepi Project.

Build Status

  • Build Status Ubuntu
  • Build Status Mac OS X

How to install

$ sudo apt-get install haskell-platform libncurses5-dev gcc m4 patch
$ cabal install drift
$ cabal install ajhc

How to build latest version

$ sudo apt-get install make locales autoconf drift \
  libconfig-yaml-perl graphviz haskell-platform cpphs pandoc hscolour po4a \
  libghc-temporary-dev libghc-haskeline-dev libghc-utf8-string-dev libghc-hssyck-dev \
  libghc-test-framework-th-dev libghc-test-framework-hunit-dev \
  libghc-test-framework-quickcheck2-dev libghc-uniplate-dev libgc-dev gcc valgrind
$ git clone git://github.com/ajhc/ajhc.git
$ cd ajhc
$ git checkout arafura
$ autoreconf -i
$ ./configure
$ make
$ make install

For developing

First, you should use the arafura branch, rather than master branch.

You should send patch to jhc, if testing on Ajhc is good.

$ darcs get http://repetae.net/repos/jhc
$ cd jhc/
$ patch -p1 < ~/yourfile.patch
$ darcs record -a
$ darcs send

The command darcs send sends email the patch to jhc author (= John Meacham).

Perhaps you can get internal overview with following compile flow image:

Future plan

  • Benchmark (speed, memory size, compare with eLua/mruby/.NET Micro Framework)
  • No more depend on Perl (LWP and YAML).
  • Port Haskell libraries on haskell-platform to Ajhc.
  • Understand jhc's region inference.
  • Play with Google Native Client. https://developers.google.com/native-client/
  • Write Linux kernel driver with Haskell.
  • Get smaller RTS. Benchmark the RTS for running on custom FPGA CPU.
  • Start rewritng NetBSD kernel with Ajhc.

License