Skip to content

Commit

Permalink
Merge pull request #561 from diml/small-lib-improvements
Browse files Browse the repository at this point in the history
Small lib improvements
  • Loading branch information
rgrinberg committed Mar 1, 2018
2 parents 45535f7 + d5ebd0e commit 7ed033c
Show file tree
Hide file tree
Showing 7 changed files with 342 additions and 359 deletions.
10 changes: 5 additions & 5 deletions src/inline_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ module Backend = struct

type t =
{ info : Info.t
; id : Lib.Id.t
; lib : Lib.t
; runner_libraries : (Lib.t list, exn) result
; extends : ( t list, exn) result option
}

let desc ~plural = "inline tests backend" ^ if plural then "s" else ""
let desc_article = "an"

let id t = t.id
let lib t = t.lib
let deps t = t.extends

let instantiate ~resolve ~get id (info : Info.t) =
let instantiate ~resolve ~get lib (info : Info.t) =
{ info
; id
; lib
; runner_libraries = Result.all (List.map info.runner_libraries ~f:resolve)
; extends =
let open Result.O in
Expand All @@ -87,7 +87,7 @@ module Backend = struct
let to_sexp t =
let open Sexp.To_sexp in
let lib x = string (Lib.name x) in
let f x = string x.id.name in
let f x = string (Lib.name x.lib) in
((1, 0),
record
[ "runner_libraries", list lib (Result.ok_exn t.runner_libraries)
Expand Down

0 comments on commit 7ed033c

Please sign in to comment.