Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006423OCamlOCaml generalpublic2014-05-14 16:272014-06-02 20:29
Assigned Todoligez 
PrioritynormalSeverityfeatureReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006423: lazy exception patterns
DescriptionThe 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) -> ...
   | ...
TagsNo tags attached.
Attached Files

- Relationships
related to 0006422acknowledgeddoligez Support "exception" under or-patterns 
related to 0006318resolvedfrisch Extend try with "success" handling 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-05-14 16:27 yallop New Issue
2014-05-14 16:27 yallop Relationship added related to 0006422
2014-05-14 16:27 yallop Relationship added related to 0006318
2014-06-02 20:29 doligez Assigned To => doligez
2014-06-02 20:29 doligez Status new => acknowledged

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker