Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/smlnj-lib/Controls/controls.sml
ViewVC logotype

Diff of /sml/trunk/src/smlnj-lib/Controls/controls.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1194, Fri May 17 14:32:28 2002 UTC revision 1195, Fri May 17 17:57:49 2002 UTC
# Line 25  Line 25 
25    (* this exception is raised to communicate that there is a syntax error    (* this exception is raised to communicate that there is a syntax error
26     * in a string representation of a control value.     * in a string representation of a control value.
27     *)     *)
28      exception ValueSyntax of {ctlName : string, value : string}      exception ValueSyntax of {tyName : string, ctlName : string, value : string}
29    
30      fun stringControl {tyName, fromString, toString} = let      fun stringControl {tyName, fromString, toString} = let
31            fun mk (Ctl{name, get, set, priority, obscurity, help}) = Ctl{            fun mk (Ctl{name, get, set, priority, obscurity, help}) = Ctl{
# Line 33  Line 33 
33                    get = fn () => toString(get()),                    get = fn () => toString(get()),
34                    set = fn sval => (case fromString sval                    set = fn sval => (case fromString sval
35                       of NONE => raise ValueSyntax{                       of NONE => raise ValueSyntax{
36                                tyName = tyName,
37                              ctlName = Atom.toString name,                              ctlName = Atom.toString name,
38                              value = sval                              value = sval
39                            }                            }

Legend:
Removed from v.1194  
changed lines
  Added in v.1195

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0