Skip to content

Support with syntax#41

Merged
mshinwell merged 13 commits intomshinwell:5.2.0-parallelfrom
riaqn:liam-with-syntax
Sep 9, 2024
Merged

Support with syntax#41
mshinwell merged 13 commits intomshinwell:5.2.0-parallelfrom
riaqn:liam-with-syntax

Conversation

@riaqn
Copy link
Copy Markdown

@riaqn riaqn commented Sep 9, 2024

Also contains changes from oxcaml#2925
Issues remaining to resolve:

  • Check that all ~type_equal is passed correctly. Set it to assert false if possible for sanity.

  • (Fixed) Currently printing of recursive types will hang:
    type r = R of r list [@@unboxed]
    let rec a = R [a];;
    [%%expect{|
    type r = R of r list [@@unboxed]
    val a : r = R []
    |}];;
    Probably related code: search in genprintval.ml, or reduce_bound in jkind.ml

  • Currently we are printing value mod (ty) instead of value mod 'a. Yeah that's a string literal (ty). This is to help debug the previous point. UPDATE: I can't just use Printtyp.tree_of_typexp for that - I need to do things similar to tree_of_type_decl. Too much work so I gave up.

  • Currently only option and list in predef.ml support this. We should support user syntax as well. The parsing and everything is already done, the blocking bit is about duplicated call in typedecl.ml.

  • If possible, also do some clean-up of the code.

@mshinwell mshinwell marked this pull request as ready for review September 9, 2024 16:22
@mshinwell mshinwell merged commit a468bcc into mshinwell:5.2.0-parallel Sep 9, 2024
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

Successfully merging this pull request may close these issues.

3 participants