-
Notifications
You must be signed in to change notification settings - Fork 1
Make Env-taking generators standalone functions #250
Copy link
Copy link
Open
Labels
Area:FuzzerSpecifically affecting the program mutatorSpecifically affecting the program mutatorType:EnhancementNew feature or requestNew feature or request
Description
A common pattern in the codebase these days is:
module Foo (Env : Env_types.S) = struct
let quickcheck_generator = (* ... *)
(* ... *)
end
let gen_foo env =
let module F = Foo (struct let env = env end) in quickcheck_generatorThis is unnecessarily inducing a lot of module boilerplate we don't need, because we could rewrite to:
let gen_foo (env : Env.t) = (* ... *)
module Foo (Env : Env_types.S) = struct
let quickcheck_generator = gen_foo Env.env
(* ... *)
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area:FuzzerSpecifically affecting the program mutatorSpecifically affecting the program mutatorType:EnhancementNew feature or requestNew feature or request