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: 4117 Reporter:@yakobowski Status: closed (set by @garrigue on 2007-01-30T01:54:29Z) Resolution: not a bug Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general)
Bug description
Consider a fonction of signature
val union : (keep:node -> lose:node -> node) -> keep:node -> lose:node -> unit
(I use it to fuse two multi-equations during unification, while specifying how to update the descriptors. In particular, I need to know which node is kept, because in case of a Var-Constr unification, I want to keep the constructor).
If I try to entirely discard one of the descriptors, I can:
apply it to (fun ~keep ~lose -> keep). Then I get a warning that lose is not used
apply it without labels (but this defeats the purpose of using labels in the first place)
apply it with juste one label (fun ~keep _ -> keep), but typing of labels
prevent this.
Maybe the warning on the first line could be moved to the second category of warnings for unused variables ?
--
Boris
The text was updated successfully, but these errors were encountered:
Keep in mind that ~lose is an abbreviation for ~lose:lose, so you can silence the warning by
applying your "option" function to (fun ~keep ~lose:_ -> keep).
Original bug ID: 4117
Reporter: @yakobowski
Status: closed (set by @garrigue on 2007-01-30T01:54:29Z)
Resolution: not a bug
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Consider a fonction of signature
val union : (keep:node -> lose:node -> node) -> keep:node -> lose:node -> unit
(I use it to fuse two multi-equations during unification, while specifying how to update the descriptors. In particular, I need to know which node is kept, because in case of a Var-Constr unification, I want to keep the constructor).
If I try to entirely discard one of the descriptors, I can:
prevent this.
Maybe the warning on the first line could be moved to the second category of warnings for unused variables ?
--
Boris
The text was updated successfully, but these errors were encountered: