Original bug ID: 6423
Reporter: @yallop
Status: acknowledged (set by @damiendoligez on 2014-06-02T18:29:00Z)
Resolution: open
Priority: normal
Severity: feature
Category: language features
Related to: #6318 #6422
Monitored by: @whitequark @hcarty
Bug description
The idea is to support exception matching under lazy patterns, as Alain proposed in discussion under PR6318. For example, we might write:
match f e with
lazy x, _ -> ...
| lazy (exception Not_found), Some x -> ...
| ...
Unlike top-level exception patterns which can only appear in 'match' and 'try', we can support exception pattern under lazy in any pattern context. For example,
let (lazy (exception E)) = raise E in e
is equivalent to
Eventually lazy patterns could support or patterns for exception matching (cf. PR6422):
match f e with
lazy (None | exception Not_Found) -> ...
| ...
Original bug ID: 6423
Reporter: @yallop
Status: acknowledged (set by @damiendoligez on 2014-06-02T18:29:00Z)
Resolution: open
Priority: normal
Severity: feature
Category: language features
Related to: #6318 #6422
Monitored by: @whitequark @hcarty
Bug description
The idea is to support exception matching under lazy patterns, as Alain proposed in discussion under PR6318. For example, we might write:
Unlike top-level exception patterns which can only appear in 'match' and 'try', we can support exception pattern under lazy in any pattern context. For example,
is equivalent to
Eventually lazy patterns could support or patterns for exception matching (cf. PR6422):
match f e with
lazy (None | exception Not_Found) -> ...
| ...