diff --git a/src/bindings/RescriptCompilerApi.res b/src/bindings/RescriptCompilerApi.res index bb742b939..eef8c3550 100644 --- a/src/bindings/RescriptCompilerApi.res +++ b/src/bindings/RescriptCompilerApi.res @@ -36,6 +36,7 @@ module Version = { | V1 | V2 | V3 + | V4 | UnknownVersion(string) // Helps finding the right API version @@ -57,6 +58,7 @@ module Version = { } | list{"2"} => V2 | list{"3"} => V3 + | list{"4"} => V4 | _ => UnknownVersion(apiVersion) } @@ -65,6 +67,7 @@ module Version = { | V1 => "1.0" | V2 => "2.0" | V3 => "3.0" + | V4 => "4.0" | UnknownVersion(version) => version } @@ -73,7 +76,7 @@ module Version = { let availableLanguages = t => switch t { | V1 => [Lang.Reason, Res] - | V2 | V3 => [Lang.Res] + | V2 | V3 | V4 => [Lang.Res] | UnknownVersion(_) => [Res] } } diff --git a/src/bindings/RescriptCompilerApi.resi b/src/bindings/RescriptCompilerApi.resi index d93d5bbd3..cfb3065aa 100644 --- a/src/bindings/RescriptCompilerApi.resi +++ b/src/bindings/RescriptCompilerApi.resi @@ -24,6 +24,7 @@ module Version: { | V1 | V2 | V3 + | V4 | UnknownVersion(string) // Helps finding the right API version diff --git a/src/common/CompilerManagerHook.res b/src/common/CompilerManagerHook.res index 65e745f06..62225fda0 100644 --- a/src/common/CompilerManagerHook.res +++ b/src/common/CompilerManagerHook.res @@ -488,7 +488,7 @@ let useCompilerManager = ( | Lang.Reason => instance->Compiler.reasonCompile(code) | Lang.Res => instance->Compiler.resCompile(code) } - | V2 | V3 => + | V2 | V3 | V4 => switch lang { | Lang.OCaml => instance->Compiler.ocamlCompile(code) | Lang.Reason =>