Skip to content

Commit 5633b85

Browse files
committed
cleanup
1 parent 9c81326 commit 5633b85

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

jscomp/gentype/Config_.ml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ let bsPlatformLib ~config =
4343
| ES6 -> config.platformLib ^ "/lib/es6"
4444
| CommonJS -> config.platformLib ^ "/lib/js"
4545

46-
let bsPlatformLibExtension = ".js"
47-
48-
let getBsCurryPath ~config =
49-
bsPlatformLib ~config ^ "/curry" ^ bsPlatformLibExtension
46+
let getBsCurryPath ~config = Filename.concat (bsPlatformLib ~config) "curry.js"
5047

5148
type map = Ext_json_types.t Map_string.t
5249

@@ -87,15 +84,15 @@ let setDebug ~gtconf =
8784
| Some (Obj { map }) -> Map_string.iter map Debug.setItem
8885
| _ -> ()
8986

90-
let bsconfig = "bsconfig.json"
87+
let compilerConfigFile = "bsconfig.json"
9188

9289
let rec findProjectRoot ~dir =
93-
if Sys.file_exists (Filename.concat dir bsconfig) then dir
90+
if Sys.file_exists (Filename.concat dir compilerConfigFile) then dir
9491
else
9592
let parent = dir |> Filename.dirname in
9693
if parent = dir then (
9794
prerr_endline
98-
("Error: cannot find project root containing " ^ bsconfig ^ ".");
95+
("Error: cannot find project root containing " ^ compilerConfigFile ^ ".");
9996
assert false)
10097
else findProjectRoot ~dir:parent
10198

jscomp/gentype/Paths.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ let getCmtFile cmt =
5757
cmtFile
5858

5959
let getBsConfigFile ~projectRoot =
60-
let bsconfig = concat projectRoot "bsconfig.json" in
60+
let bsconfig = concat projectRoot compilerConfigFile in
6161
match bsconfig |> Sys.file_exists with true -> Some bsconfig | false -> None
6262

6363
(** Find the relative path from /.../bs/lib

0 commit comments

Comments
 (0)