You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6839 Reporter:@zoggy Assigned to:@diml Status: assigned (set by @mshinwell on 2016-12-12T16:19:35Z) Resolution: open Priority: normal Severity: feature Version: 4.02.1 Category: otherlibs Tags: junior_job Monitored by:@diml
Bug description
When building parsetrees using ppx, it is possible to define types using the "option" constructor.
But internally, these constructor has a "special" longident defined in parser.ml with the mkoption function:
let mkoption d =
let loc = {d.ptyp_loc with loc_ghost = true} in
Typ.mk ~loc (Ptyp_constr(mkloc (Ldot (Lident "predef", "option")) loc,[d]))
Then, this special longident is required in various places to be exactly this one, for example in the is_predef_option of parsing/pprint_ast.ml .
Adding mkoption to parser.mli would ease the generation of the option constructor in ppx tools.
By now, I create the same longident but if this internal longident changes in the future, my code will break.
The text was updated successfully, but these errors were encountered:
Original bug ID: 6839
Reporter: @zoggy
Assigned to: @diml
Status: assigned (set by @mshinwell on 2016-12-12T16:19:35Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.02.1
Category: otherlibs
Tags: junior_job
Monitored by: @diml
Bug description
When building parsetrees using ppx, it is possible to define types using the "option" constructor.
But internally, these constructor has a "special" longident defined in parser.ml with the mkoption function:
let mkoption d =
let loc = {d.ptyp_loc with loc_ghost = true} in
Typ.mk ~loc (Ptyp_constr(mkloc (Ldot (Lident "predef", "option")) loc,[d]))
Then, this special longident is required in various places to be exactly this one, for example in the is_predef_option of parsing/pprint_ast.ml .
Adding mkoption to parser.mli would ease the generation of the option constructor in ppx tools.
By now, I create the same longident but if this internal longident changes in the future, my code will break.
The text was updated successfully, but these errors were encountered: