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")));

This example get's parsed with errors for me: