Decouple sexp from Import
This commit is contained in:
parent
5147de3873
commit
03e439e449
|
@ -1,4 +1,4 @@
|
||||||
open Import
|
open Stdune
|
||||||
|
|
||||||
include (Usexp : module type of struct include Usexp end
|
include (Usexp : module type of struct include Usexp end
|
||||||
with module Loc := Usexp.Loc)
|
with module Loc := Usexp.Loc)
|
||||||
|
@ -135,7 +135,7 @@ module Of_sexp = struct
|
||||||
(Ast.loc sexp, f sexp)
|
(Ast.loc sexp, f sexp)
|
||||||
|
|
||||||
let of_sexp_error ?hint sexp str = raise (Of_sexp (Ast.loc sexp, str, hint))
|
let of_sexp_error ?hint sexp str = raise (Of_sexp (Ast.loc sexp, str, hint))
|
||||||
let of_sexp_errorf ?hint sexp fmt = ksprintf (of_sexp_error ?hint sexp) fmt
|
let of_sexp_errorf ?hint sexp fmt = Printf.ksprintf (of_sexp_error ?hint sexp) fmt
|
||||||
|
|
||||||
let raw x = x
|
let raw x = x
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ module Of_sexp = struct
|
||||||
match String.Map.of_list (list (pair string f) sexp) with
|
match String.Map.of_list (list (pair string f) sexp) with
|
||||||
| Ok x -> x
|
| Ok x -> x
|
||||||
| Error (key, _v1, _v2) ->
|
| Error (key, _v1, _v2) ->
|
||||||
of_sexp_error sexp (sprintf "key %S present multiple times" key)
|
of_sexp_error sexp (Printf.sprintf "key %S present multiple times" key)
|
||||||
|
|
||||||
let string_hashtbl f sexp =
|
let string_hashtbl f sexp =
|
||||||
let map = string_map f sexp in
|
let map = string_map f sexp in
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
open Import
|
open Stdune
|
||||||
|
|
||||||
include module type of struct include Usexp end with module Loc := Usexp.Loc
|
include module type of struct include Usexp end with module Loc := Usexp.Loc
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue