The Idris 2 compiler (including the Erlang code generator) has the following intermediate representations:
+-----------+
| PTerm | (High-level Idris)
+-----------+
|
|
+-----------+
| TTImp |
+-----------+
|
|
+-----------+
| Term | (TT)
+-----------+
|
|
+-----------+
| CExp |------------+
+-----------+ |
| |
| |
+-----------+ +-----------+
| NamedCExp | | Lifted |
+-----------+ +-----------+
| |
| |
+-----------+ +-----------+
| ErlExpr | | ANF |
+-----------+ +-----------+
| |
| |
+---------------+ +-----------+
|AbstractFormat | | VMCode |
+---------------+ +-----------+
AbstractFormat
tries to be a faithful representation of the Erlang Abstract Format.ErlExpr
is similar toNamedCExp
but it include some Erlang-specific functionality.