I am trying to insert a string into a record type, which is a list of strings. However, the semicolon after the record keeps throwing an error. Also a couple of lines down there's a type error that I think is related because as I've been playing around with debugging the first error sometimes it goes away. Deleting the semicolon, adding or deleting "...", "_", or the entire record hasn't worked and often only causes more errors.
if (lecture.time == workweek.time) {
switch (lecture.priority, workweek.priority) {
| (3, 1) => failwith("No time available for class")
| (3, 2) =>
switch (lecture.day) {
| "monday" => {monday: [lecture.lecture], ...};
| "tuesday" => {..., tuesday: [lecture.lecture], ...};
| "wednesday" => {..., wednesday: [lecture.lecture], ...};
| "thursday" => {..., thursday: [lecture.lecture], ...};
| "friday" => {..., friday: [lecture.lecture]};
| _ => failwith ("not a valid day")
The errors:
Error: Syntax error
Error: This pattern matches values of type string
but a pattern was expected which matches values of type (int, int)