Skip to content

Add type annotation syntax for lambdas #67

@j-hui

Description

@j-hui

Right now, if we want to type-annotate a lambda, e.g., fun x { x }, we need to write it postfix, i.e.,

(fun x
  x): a -> a

However, this can get kind of cumbersome. @sedwards-lab suggested that to keep the syntax uniform, we should also support the following:

fun (x: a) -> a
  x
fun x : a -> a
  x

This should of course generalize to lambdas with multiple arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfrontendEngineering issues related to the frontend subsystemgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions