The foundation of the ohua parallelizing compiler
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
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
- verifying the input expressions are executable by the runtime
- lowering into a dataflow
- performing generic optimisations
Furthermore the compiler defines a set of hooks for adding custom manipulations to the compilation pipeline.
Information for Developers
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.
The default formatting for code is done using the
hindent library, the
.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
- You can use
Ohua.Preludewhich pulls in
Universumas well as basic ohua core modules (
Ohua.Util) and code traversal helpers such as
- Alternatively you can import
Preludeif you really like
The following are some notes on using
Universum, assembled for your convenience:
This should not be an issue, most value we manipulate in this library are
Trace functions (
traceShowIdetc) are in scope by default, but raise a warning.
Aka you can use them, but you have to remove them if you want the code to pass the CI.
<>(also in scope by default) rather than
++to concatenate strings.
some IO is polymorphic
putStrLn "some string"will raise an ambiguity error, you'll have to annotate the string like so
putStrLn ("some string" :: Text)
mtlstuff is in scope by default.
Statemonad (+ transformers, + classes) are in scope by default. No need to import
For more information on universum check out the GitHUb repository.