Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pp ignores custom pp in substructures #92

Open
Ngoguey42 opened this issue Feb 8, 2022 · 0 comments
Open

pp ignores custom pp in substructures #92

Ngoguey42 opened this issue Feb 8, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Ngoguey42
Copy link
Contributor

      type a = int * int

      let pp ppf (x, y) = Format.fprintf ppf "%d/%d" x y
      let a_t = Repr.map ~pp Repr.unit (fun _ -> assert false) (fun _ -> ())

      type b = a list [@@deriving repr]

      let () =
        let va = (42, 43) in
        Fmt.epr "%a\n%!" pp va;
        Fmt.epr "%a\n%!" (Repr.pp a_t) va;
        Fmt.epr "%a\n%!" (Repr.pp b_t) [ va ]

The above program running on the main branch produces:

42/43
42/43
[{}]
@Ngoguey42 Ngoguey42 added the bug Something isn't working label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant