elm-in-elm / compiler

Elm compiler written in Elm

Home Page:https://elm-in-elm.github.io/compiler/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement unit value and type

Janiczek opened this issue · comments

() should be a valid Elm syntax. What we emit it as is probably not that important right now (we will find out later!) - let's emit as {"type": "unit"}

That means we need to implement:

  • parser tests
  • emit tests (if done after #7 )
  • new AST.Frontend.Expr case
  • parser
  • new type (treat it similarly to literals in type inference)
  • JS emit case

No optimizations needed (or at least I can't think of any), no desugaring needed either.

The compiler errors will probably guide you 😅 Ask here or on Discord if anything is unclear!