2024-04-15 10:07:21 -06:00
2024-04-15 10:07:21 -06:00
2024-02-13 13:20:39 -07:00
2024-04-15 10:07:21 -06:00
2024-04-15 10:07:21 -06:00
2024-04-15 10:07:21 -06:00
2024-04-15 10:07:21 -06:00
2023-12-04 19:52:35 -07:00
2024-01-25 15:52:56 -07:00
2024-04-15 10:07:21 -06:00
2024-04-15 10:07:21 -06:00
2024-01-24 09:39:06 -07:00
org
2024-04-15 10:07:21 -06:00
2024-04-15 10:07:21 -06:00
2024-02-08 00:36:23 -07:00
2024-02-08 00:36:23 -07:00

rl'

rl' will be a lazily-evaluated, purely-functional, statically-typed language heavily imitating Haskell.

Architecture

rlpc.drawio.svg

Build Info

  • rlpc is built using Cabal
  • rlpc's documentation is built using Sphinx
$ cabal build       # Build the rlpc compiler
$ cabal install     # Install rlpc to $PATH
$ cabal haddock     # Build the API docs w/ Haddock
$ make -C doc html  # Build the primary docs w/ Sphinx

# run the test suite
$ cabal test --test-show-details=direct

Use

TLDR

# Compile and evaluate examples/rlp/QuickSort.rl
$ rlpc examples/QuickSort.rl
# Compile and evaluate t.cr, with evaluation info dumped to t.log
$ rlpc -ddump-eval -l t.log t.cr
# Compile and evaluate t.rl, dumping the desugared Core
$ rlpc -ddump-desugared t.rl
# Compile and evaluate t.rl with all compiler messages enabled
$ rlpc -dALL t.rl

Options

Usage: rlpc [-l|--log FILE] [-d DEBUG FLAG] [-f COMPILATION FLAG]
            [-e|--evaluator gm|ti] [--heap-trigger INT] [-x|--language rlp|core]
            FILES...

Available debug flags include:

  • -ddump-desugared: dump Core generated from rl'
  • -ddump-parsed-core: dump raw Core AST
  • -ddump-parsed: dump raw rl' AST
  • -ddump-eval: dump evaluation logs
  • -dALL: disable debug message filtering. enables all debug messages

Demos

[]

To-do List

TODO rlp to core desugaring   feature

TODO README.md -> README.org   docs

TODO case inference   feature

TODO ADT support in Rlp/HindleyMilner.hs   feature

TODO whole-program inference (wrap top-level in a letrec)   feature

TODO user-supplied annotation support in Rlp/HindleyMilner.hs   feature

TODO update architecture diagram   docs

TODO pattern support; everywhere   feature

TODO G-machine visualiser   docs

TODO lambda calculus visualiser   docs

TODO in Rlp/HindleyMilner.hs, fix listenFreshTvNames   housekeeping

it does work in its current state, however it captures an unreasonably excessive amount of names, even for a heuristic.

TODO up-to-date examples [0/2]   docs

  • quicksort (core and rlp)
  • factorial (core and rlp)

Releases

December Release

  • Tests

    • Core lexer
    • Core parser
    • Evaluation model
  • Benchmarks
  • Stable Core lexer
  • Stable Core parser
  • Stable evaluation model

    • Garbage Collection
  • Stable documentation for the evaluation model

February Release Plan

  • Beta rl' to Core
  • UX improvements

    • Actual compiler errors no more unexceptional `error` calls
    • Better CLI dump flags
    • Annotate the AST with token positions for errors (NOTE: As of Feb. 1, this has been done, but the locational info is not yet used in error messages)
  • Compiler architecture diagram
  • More examples

March Release Plan

  • Tests

    • rl' parser
    • Type inference
  • Ditch TTG in favour of a simpler AST focusing on extendability via Fix, Free, Cofree, etc. rather than boilerplate-heavy type families
  • rl' type inference
  • Core type checking
Description
No description provided
Readme 2.5 MiB
Latest
2024-02-16 14:20:14 -07:00
Languages
Haskell 83.8%
Yacc 10.7%
Logos 5.5%