ohua-dev / ohua-core

Core Haskell library for the compiler
https://ohua-dev.github.io
Eclipse Public License 1.0
5 stars 0 forks source link
data-flow haskell ohua-compiler parallel-computing parallel-programming parallelizing-compilers

The foundation of the ohua parallelizing compiler

Build Status Documentation Status

The ohua-core library is the heart of the ohua suite of parallelizing compilers.

For more information about the ohua compiler suite, goals, function etc visit the official documentation

The core library comprises the fundamental and platform independent parts used in each instance of the ohua compiler such as the EDSL for the JVM and the standalone ohua compiler.

In its essence the ohua core transforms an expression based language called ALang, which is short for "algorithm language" into a dataflow graph which can be executed by any runtime that implements the ohua exeution semantics on any platform capable of implementing the ohua core operators. Tha tasks performed by the compiler are

Furthermore the compiler defines a set of hooks for adding custom manipulations to the compilation pipeline.

Information for Developers

Documentation

The official, verbose documentation is on readthedocs.

In addition many of the parts of the compiler library are documented with the documentation tool haddock.

To get a browsable documentation locally use stack hoogle -- serve --local. This will build the documentation for both the core, as well as its dependencies and start a server locally on port 8080. There you can search for functions, types, modules and libraries and browse their documentation.

Code formatting

The default formatting for code is done using the hindent library, the configuration file .hindent.yaml can be found at the project root.

Notes on Universum

I use a Prelude replacement called Universum in this project. This has a few minor consequences for how code is written. Most importantly I activate the NoImplicitPrelude extension by default. This means you have to import a prelude explicitly.

  1. You can use Ohua.Prelude which pulls in Universum as well as basic ohua core modules (Ohua.Types, Ohua.Util) and code traversal helpers such as transform and rewrite.
  2. Alternatively you can import Universum
  3. or Prelude if you really like Prelude).

The following are some notes on using Universum, assembled for your convenience:

For more information on universum check out the GitHUb repository.