Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#130] failure to raise Bind exception

Date:
2014-11-24 22:44
Priority:
3
State:
Open
Submitted by:
Bug Submitter (webuser)
Assigned to:
David MacQueen (dbm)
Machine Architecture:
None
Operating System:
Generic Unix
Component:
Compiler
Resolution:
None
Severity:
Minor
OS Version:
OS X 10.10
SML/NJ Version:
110.77
Keywords:
pattern matching, let binding
URL:
Transcript (of reproduction):
- let val (x :: y) = nil in 3 end; val it = 3 : int - let val (_ :: _) = nil in 3 end; uncaught exception Bind [nonexhaustive binding failure] raised at: stdIn:3.9-3.23 -
Source (for reproduction):
let val (x :: y) = nil in 3 end; let val (_ :: _) = nil in 3 end;
Summary:
failure to raise Bind exception

Detailed description
A non-exhaustive let-binding pattern with non matching definiens
should raise a Bind exception at runtime. In the example it does
not do so. A similar example with variables replaced by wildcard
patterns will raise Bind.

Additional comments:
Premature optimization or simplification of let binding code
where no variables are bound?


Submitted via web form by David MacQueen dmacqueen@mac.com

Comments:

No Comments Have Been Posted

Attached Files:

Changes

Field Old Value Date By
assigned_tonone2014-11-25 21:40dbm