Rescript convert "don't know what to do with" .re file

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?

What does Test.re contain?

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 ++ "."
  };

I have raised an issue convert subcommand does not work for .re and .rei files · Issue #6009 · rescript-lang/rescript-compiler · GitHub

conversion from .re has been removed in v10 , version 9 can be used for conversion.

1 Like