From: Robert H. <Rob...@cs...> - 2001-09-07 14:19:25
|
Yes it can, and it should. The name "non-expansive" was already obsolete and misleading by the SML 97 revision, but was retained for continuity's sake. This brings up a related question of whether other expressions that may raise an exception are to be non-expansive. A typical example is the binding val x as _::_ = nil whose right-hand side is deemed "non-expansive", yet the binding for x is uncons(nil) (in the obvious sense), which may raise an exception. The binding for x should be considered non-expansive, and hence non-polymorphic. More generally, for val bindings whose pattern is refutable (ie, there exists a value not matching it), the variables involved should not be generalized. For irrefutable patterns, they should be generalized iff the rhs is syntactically non-expansive in the current sense (which is, of course, conservative). Bob -----Original Message----- From: Dave Berry [mailto:da...@ta...] Sent: Wednesday, September 05, 2001 5:13 PM To: sml...@li... Subject: [Sml-implementers] Could raise be non-expansive? Am I right in thinking that the definition of non-expansive expressions could be extended with "raise nexp", with no ill-effects? I'm not suggesting that such a minor change is worthwhile; I'm just curious. Dave. _______________________________________________ Sml-implementers mailing list Sml...@li... https://lists.sourceforge.net/lists/listinfo/sml-implementers |