Coder Social home page Coder Social logo

elaine's Introduction

Elaine: Programming with Higher-Order Effects

Elaine is a programming language with support for both algebraic and higher-order effects. This repository contains the prototype for the language including:

  • Parser
  • Type checker
  • Some program transformations
  • Interpreter
  • Pretty printer
  • Tests

The language was developed as part of the thesis available at https://github.com/tertsdiepraam/thesis.

Prerequisites

To run Elaine, you need GHC installed with cabal. We recommend installing GHC via ghcup.

Running Elaine

The easiest way to run the elaine executable is directly via cabal:

cabal run elaine -- [subcommand] [args]

Once it's built, it can also be called directly:

elaine [subcommand] [args]

Subcommands

The executable has the following main subcommands:

  • run: Run an Elaine program.
  • parse: Parse an Elaine program and print the AST.
  • check: Parse and type check an Elaine program without running it.
  • explicit: Make all elaborations explicit and print the resulting program.
  • pretty: Parse and then pretty print a program.

Other, less useful commands are:

  • spans: Print a structure with spans from the parser.
  • spans-json: JSON version of spans.
  • run-unchecked: Run an Elaine program without type checking. Note that implicit elaboration resolution won't work in this mode.
  • metadata: Print metadata relating to variable resolution.
  • metadata-json: JSON version of metadata.

Syntax Highlighting

There is syntax highlighting for Elaine in any editor. However, Codex by Jonathan Dönszelmann can output HTML pages of Elaine code with syntax highlighting.

elaine's People

Contributors

tertsdiepraam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.