Type and effect system for Pattern match analysis in Elm

License: BSD-3-Clause

Language: Haskell

Modified Elm Compiler

Here is the Extended Abstract which was accepted to the POPL 2016 Student Research Competition.

The main changes can be found in the Type.Effect modules.

State of the implementation:

  • Implement Constraint Generation
  • Worklist algorithm to solve constraints
  • Instantiation and Generalization
  • (Almost done) Transfer annotations and constraints across modules
  • Fix bugs in Constructor types
  • Proper types for recursive values
  • Implication constraints for branch results
  • Implication constraints for matched variables within branch (implemented but buggy)
  • Track Control-flow along with patterns
  • Change complete pattern matches to Top
  • Implement case optimizations for if expressions
  • Support for Elm's record types

Since module-support isn't there yet, this version won't properly compile the core libraries.

To test it, clone this repository, and execute the function Compile.compileFile "Test.elm" where Test.elm is whatever Elm file you use. Make sure that it doesn't contain any imports or references to standard library functions.

Project Statistics

Sourcerank 3
Repository Size 6.31 MB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 1
Contributors 62
Tags 0
Last updated
Last pushed

Top Contributors See all

Joey Eremondi John P Mayer, Jr Max S. New Christian Widera Michael James Laszlo Pandy Max Goldstein Justin S. Leitgeb Michael Søndergaard ngunn Izaak Meckler Andrew Miller techtangents Janis Voigtländer Vladimir Bychkovsky Colin Curtin Harry Garrood Jeff Smits Alex Neslusan Daniël Heres

Something wrong with this page? Make a suggestion

Login to resync this repository