Skip to content

ERROR when parsing example from the reason website #1

Description

@WeetHet

This example get's parsed with errors for me:

type schoolPerson =
  | Teacher
  | Director
  | Student(string);

let greeting = person =>
  switch (person) {
  | Teacher => "Hey Professor!"
  | Director => "Hello Director."
  | Student("Richard") => "Still here Ricky?"
  | Student(anyOtherName) => "Hey, " ++ anyOtherName ++ "."
  };

print_endline(greeting(Teacher));
print_endline(greeting(Director));
print_endline(greeting(Student("Richard")));
Screenshot 2024-09-16 at 14 53 32

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions