This repo is a hub for projects related to multi-staged programming in Scala. It uses Lightweight Modular Staging. The main project is on staged parser combinators. Please find documentation for this project here.
To run the code, please follow these steps:
- Clone this here repo in a separate folder:
git clone [email protected]:manojo/functadelic.git
. - Profit:
$ cd functadelic
$ sbt
> test
Hope you have fun!
Here are some basic LMS conventions I use when writing LMS code:
- Each new
Ops
gets its own file - An
Exp
trait only mixes other Exp traits that are notOpt
trait Opt
traits are mixed in at a later stage. If you are often going to use one, create anOpt
trait for yourOps
which mixes the relevantOpt
traits.Fat
optimizations should not be mixed in with the classicalOpt
traits, but used independently.- If I use a certain feature (ex Option) in my current trait, I mix it in explicitly, even if some other trait I'm using has it already. Serves for documentation purposes. Of course, for really trivial stuff it's not necessary to do so.