Wiki
Clone wikihelium / popl20 / SourceStructure
Structure of the repository
Here we briefly describe the structure of the Helium repository.
Main directories
In the repository we find five directories:
src
: Source code of Helium (described below).lib
: Standard library of Helium.test
: Simple Helium programs used by automatic testing. Most of these files are very small and concern only one language feature. You can look into them, to see which language features are implemented.examples
: More complex and well commented examples of code in Helium.other
: Other useful resources related to Helium language. Currently only basic modes for Emacs and Vim are provided.
Source code
Here we provide description of the most interesting modules and directories found in the source code
Lang
Module lang contains definitions of all intermediate languages used by the interpreter. By default, the source code is transformed in the following way:
Raw
Raw
is a result of parsing.
Flat
Flat
is obtained from Raw
by compiling out the module system.
Unif
Unif
is an intermediate language of type inference.
Explicit
Explicit
is an intermediate language where most of the subtyping rules
are reified as a coercions. During translation of Unif
to Explicit
pattern
match is compiled out.
Core
Core
is similar to Explicit
, but coercions without computational meaning
are removed. This language corresponds to the calculus lambda HEL described
in the Abstracting Algebraic Effects Paper.
Untyped
Untyped
is a language where types are erased and effects names are reified
as first class values. This language coresponds to untyped calculus from the
paper, and is a source language for an abstract machine.
Transform
Transform
directory contains all the transformations of code used by Helium.
It is divided into subdirectories, by the source language of transformation.
Predef
This directory contains infrastructure for built-in functions as printStr
.
In Predef.StdExtern
you can find a complete list of these functions.
Updated