Hide the intermediate functions from PP_generic's signature
This commit is contained in:
parent
92069077df
commit
008f228ed7
@ -3,7 +3,8 @@ open Fold
|
||||
open Format
|
||||
open PP_helpers
|
||||
|
||||
let needs_parens = {
|
||||
module M = struct
|
||||
let needs_parens = {
|
||||
generic = (fun state info ->
|
||||
match info.node_instance.instance_kind with
|
||||
| RecordInstance _ -> false
|
||||
@ -36,7 +37,7 @@ let needs_parens = {
|
||||
typeVariableMap = (fun _ _ _ _ -> false) ;
|
||||
}
|
||||
|
||||
let op ppf = {
|
||||
let op ppf = {
|
||||
generic = (fun () info ->
|
||||
match info.node_instance.instance_kind with
|
||||
| RecordInstance { fields } ->
|
||||
@ -107,11 +108,12 @@ let op ppf = {
|
||||
fprintf ppf "typeVariableMap [@,@[<hv 2> %a @]@,]" (list_sep aux (fun ppf () -> fprintf ppf " ;@ ")) lst);
|
||||
}
|
||||
|
||||
let print : (unit fold_config -> unit -> 'a -> unit) -> formatter -> 'a -> unit = fun fold ppf v ->
|
||||
let print : (unit fold_config -> unit -> 'a -> unit) -> formatter -> 'a -> unit = fun fold ppf v ->
|
||||
fold (op ppf) () v
|
||||
end
|
||||
|
||||
include Fold.Folds(struct
|
||||
type state = unit ;;
|
||||
type 'a t = formatter -> 'a -> unit ;;
|
||||
let f = print ;;
|
||||
let f = M.print ;;
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user