Skip to content

Implement Variants  #18

@rpip

Description

@rpip

Proposed syntax ala Ocaml:

type <variant> =
  <Tag> [ of <type> [* <type>]... ]
  | <Tag> [ of <type> [* <type>]... ]
  | ...

Examples.

type weight = Regular | Bold
type action = 
    Focus
    | Edit of string
    | Cancel
    | Commit
    | Completed of bool
    | Delete

This is a major change as this also involves adding a type system to the language.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions