package bap-std
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7c6d0dfe2640e800829617dd150ffe748493fe3f317ed41be44312b2821deb46
md5=5dbc6677d646bec59fd7414f23e88cf8
doc/bap/Bap/Std/Project/Collator/index.html
Module Project.Collator
A pass that collates projects.
A collator is a pass that is folded over projects and computes differences between the base version and the number of alternative versions.
val register :
?desc:string ->
?package:string ->
string ->
prepare:(project -> 's) ->
collate:(int -> 's -> project -> 's) ->
summary:('s -> unit) ->
unitregister ~prepare ~collate ~summary name registers a collator.
The prepare function is called on the base version and it returns the collator's state that can be an arbitrary type 's. Then the collate function is consequitevely applied on alternative versions of the base version, with the version number passed as the first argument (starting from 0). Finally, when all versions are compared with the base, the summary function is called.
The collator fullname (package:name) must be unique, otherwise a function terminates.
apply collator projects applies the collator to the sequence of projects.
Projects are evaluated lazily, one project at time.
val find : ?package:string -> string -> t optionfind ?package name looks up a collator in the registry.
val name : info -> Bap_knowledge.Knowledge.Name.tthe collators name
val desc : info -> stringthe collators description.
val registered : unit -> info listinformation about currently registered collators