stil4m / elm-syntax

Elm syntax in Elm
MIT License
92 stars 26 forks source link

Let functions can't have documentation #169

Open jfmengels opened 1 year ago

jfmengels commented 1 year ago

Currently a let function is represented by Expression.LetFunction Function, where Function is

type alias Function =
    { documentation : Maybe (Node Documentation)
    , signature : Maybe (Node Signature)
    , declaration : Node FunctionImplementation
    }

This makes it possible to represent a let function with a documentation attached to it, but this is forbidden by the parser and the Elm compiler. We should change the type here to not include a documentation.