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

Hover over deriving in mutual recursion looks weird. #1401

Open
Kakadu opened this issue Nov 21, 2024 · 0 comments
Open

Hover over deriving in mutual recursion looks weird. #1401

Kakadu opened this issue Nov 21, 2024 · 0 comments

Comments

@Kakadu
Copy link

Kakadu commented Nov 21, 2024

When we have mutual recursion we can put [@@deriving in multiple places. The compiler generates decent code any way, but for IDE only placing attribute after first type gives decent result on hover. Also, it seems not to depend on the PPX code: both qcheck and show give similar issues.

(* good ... *)
type a =
  | A
  | B of b
[@@deriving show]
and b = C of a
(* bad 
  (* ppx deriving expansion *)
  ;;show
  let _ = fun (_ : b) -> ()
  ;;"-39"
  let () = Ppx_inline_test_lib.unset_lib "miniml"
  let () = Expect_test_collector.Current_file.unset ()
*)
  type expr = Nil | C of name * expr
  and name = { a: expr; b: expr }
  [@@deriving qcheck2]

Is it a missed case from #1245 ?
I tried 1.18.0, the last one for OCaml 4.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant