| 1 | (************************************************************************) |
| 2 | (* This file is licensed under The MIT License *) |
| 3 | (* See LICENSE for more information *) |
| 4 | (************************************************************************) |
| 5 | |
| 6 | (** Recursive scan of a directory *) |
| 7 | type 'a t |
| 8 | |
| 9 | (** [scan ~prefix dir] scan for coq modules in dir [prefix] will |
| 10 | inject a dir *) |
| 11 | val scan : prefix:string list -> string -> Coq_module.t t |
| 12 | |
| 13 | (** [iter ~f dir_info] iterate contents, [prefix] denotes the sub-tree |
| 14 | we are in *) |
| 15 | val iter : f:(prefix:string list -> 'a list -> unit) -> 'a t -> unit |
| 16 | |
| 17 | (** [fold ~f ~init dir_info] fold over each folder's contents *) |
| 18 | val fold : f:(prefix:string list -> 'b -> 'a list -> 'b) -> init:'b -> 'a t -> 'b |
| 19 | |
| 20 | (** Flatten the list of objects of a recursive scan *) |
| 21 | val coq_modules : 'a t -> 'a list |
| 22 | |
| 23 | val pp : Format.formatter -> Coq_module.t t -> unit |
| 24 | |
| 25 | (* To remove *) |
| 26 | val map : f:(prefix:string list -> 'a -> 'b) -> 'a t -> 'b t |