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: 6936 Reporter:@hhugo Assigned to:@alainfrisch Status: resolved (set by @alainfrisch on 2016-12-08T15:46:03Z) Resolution: suspended Priority: normal Severity: feature Version: 4.02.2 Target version: later Category: standard library Monitored by:@Drup@diml
Bug description
The order is currently unspecified.
ie:
| Ptyp_arrow (lab, t1, t2) ->
arrow ~loc ~attrs lab (sub.typ sub t1) (sub.typ sub t2)
should be written
| Ptyp_arrow (lab, t1, t2) ->
let t1' = sub.typ sub t1 in
let t2' = sub.typ sub t2 in
arrow ~loc ~attrs lab t1' t2'
It's probably a good idea, although it will not guarantee that terms are traversed in the same ordering as they appear in the source code. For instance:
let x : int = 3
gives the same Parsetree (modulo locations) as:
let x = (3 : int)
And the natural traversal order (based on the Parsetree representation) will go over expression "3" before type "int".
Marking as suspended, since it's a rather tedious change and the benefit is not so clear to me (esp. considering my remark that the traversal order would still not necessarily match source code locations). Feel free to submit a PR, though!
Original bug ID: 6936
Reporter: @hhugo
Assigned to: @alainfrisch
Status: resolved (set by @alainfrisch on 2016-12-08T15:46:03Z)
Resolution: suspended
Priority: normal
Severity: feature
Version: 4.02.2
Target version: later
Category: standard library
Monitored by: @Drup @diml
Bug description
The order is currently unspecified.
ie:
should be written
Additional information
similar issue in ppx_tools ocaml-ppx/ppx_tools#27
The text was updated successfully, but these errors were encountered: