Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 7ff2eb3

Browse files
committed
Remove readFileResult
1 parent 2bdc0d9 commit 7ff2eb3

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/Files.ml

-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ let readFile path =
6868
Some text
6969
| _ -> None
7070

71-
let readFileResult path =
72-
match readFile path with
73-
| None -> Error ("Unable to read " ^ path)
74-
| Some text -> Ok text
75-
7671
let exists path = match maybeStat path with None -> false | Some _ -> true
7772

7873
let ifExists path = match exists path with true -> Some path | false -> None

src/Packages.ml

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ let makePathsForModule (localModules : (string * SharedTypes.paths) list)
1414
pathsForModule
1515

1616
let newBsPackage rootPath =
17-
match Files.readFileResult (rootPath /+ "bsconfig.json") with
18-
| Error e -> Error e
19-
| Ok raw -> (
17+
let path = rootPath /+ "bsconfig.json" in
18+
match Files.readFile path with
19+
| None -> Error ("Unable to read " ^ path)
20+
| Some raw -> (
2021
let config = Json.parse raw in
2122
Log.log {|📣 📣 NEW BSB PACKAGE 📣 📣|};
2223
(* failwith("Wat"); *)

0 commit comments

Comments
 (0)