Student: [Emma Bastås][eb]
Mentor: [Aaron VonderHaar][av]
Organization: [elm-tooling][et]
Original proposal: elm-tooling/gsoc-projects#13
module MyModule exposing (Expr(..), mirror, myExpression, sum) | |
import Safe.Recursion exposing (Recurse) | |
type Expr | |
= Num Int | |
| Add (Recurse Expr) (Recurse Expr) | |
| Mul (Recurse Expr) (Recurse Expr) |
Historically the Elm compiler implemented it's parsers using the libraries parsec and indents (in this document parsec is used to refer to both of these libraries), since elm-format is based on the Elm compiler it has inherited this as well. However, in Elm 0.19 the parsing codebase was overhauled, the Elm compiler got it's own parsing primitives and all of the parsers where rewritten to use these primitives instead of parsec. To integrate these changes into elm-format is non trivial and elm-format has continued using parsec.
This situation is not ideal, there is great value in having the parsing logic for the Elm compiler and elm-format be as similar as possible from a maintainability standpoint. Moreover, the primitives in the Elm compiler are more elegant and performant in the context of parsing Elm code. For the long term elm-format ne