nireno
1
I’m trying to convert a ReasonML file to Rescript but it’s throwing an error:
rescript -v
10.1.2
rescript convert src/Test.re
Error when converting src/Test.re
don't know what to do with src/Test.re
It seems to work fine against .ml files. Is ReasonML conversion no longer supported?
ryyppy
2
What does Test.re
contain?
nireno
3
This ml converts
(* test.ml *)
type schoolPerson = Teacher | Director | Student of string
let greeting = function
| Teacher -> "Hey Professor!"
| Director -> "Hello Director."
| Student "Richard" -> "Still here Ricky?"
| Student anyOtherName -> "Hey, " ^ anyOtherName ^ "."
This reason doesn’t
/* test.re */
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 ++ "."
};