the-sett / elm-syntax-dsl

A DSL for creating Elm syntax trees and pretty printing Elm source code.
BSD 3-Clause "New" or "Revised" License
20 stars 4 forks source link

Add helper functions for applying constructors. #14

Closed rupertlssmith closed 4 years ago

rupertlssmith commented 5 years ago

Something like

construct : String -> List Expression -> Expression
fqConstruct : ModuleName -> String -> List Expression -> Expression

Constructors are currently built by applying the constructor as a function:

CG.apply [ CG.fun "SomeConstructor", arg1, arg2, arg3, ... ]

But the helper functions might make it more obvious how to apply constructors.