Skip to content

Commit

Permalink
Use List.map only to keep order of primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
hra687261 authored and Gbury committed Jun 23, 2023
1 parent eb523dd commit aa733f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lsp/server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ exception ServerError of string
let parse_settings settings =
match settings with
| `Assoc [ "preludes", `List l ] ->
List.fold_left (
fun acc s ->
List.map (
fun s ->
match s with
| `String f -> f :: acc
| `String f -> f
| _ ->
raise (ServerError (
Format.asprintf
"Expected a path to a prelude file as a string, \
instead got %a@."
Yojson.Safe.pp s))
) [] l
) l
| _ ->
raise (ServerError (
Format.asprintf
Expand All @@ -34,7 +34,7 @@ let preprocess_uri uri =
else uri

let mk_prelude files =
List.rev_map (
List.map (
fun f ->
let dir, file = Dolmen_loop.State.split_input (`File f) in
Dolmen_loop.State.mk_file dir file
Expand Down

0 comments on commit aa733f8

Please sign in to comment.