Skip to content

Commit

Permalink
utils/Repo: new constructors shift and singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
pveber committed Nov 12, 2017
1 parent da5164b commit 3f0a3ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/utils/repo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ let add_prefix prefix items =
List.map items ~f:(function
| Repo_item (p, w) -> Repo_item (prefix @ p, w)
)

let shift dir items = add_prefix [ dir ] items

let singleton dir w = [ [ dir ] %> w ]
4 changes: 4 additions & 0 deletions lib/utils/repo.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ type t = item list

val ( %> ) : string list -> _ workflow -> item

val singleton : string -> _ workflow -> t

val add_prefix : string list -> t -> t

val shift : string -> t -> t

val to_term :
?precious:Bistro.any_workflow list ->
outdir:string ->
Expand Down

0 comments on commit 3f0a3ba

Please sign in to comment.