aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/goptions.ml
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-04-09 21:42:16 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-04-09 21:42:16 +0000
commit24834f7cd3c948e5c1d1763d00209a5125fa4f57 (patch)
tree538df200306df4286a034c2a8b897c5cf554a5d7 /library/goptions.ml
parent89fa954213e2bf15c684438ab8aac8fea1720166 (diff)
Bug init_function
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3894 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library/goptions.ml')
-rw-r--r--library/goptions.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/goptions.ml b/library/goptions.ml
index b1868fdd7..1b29721c1 100644
--- a/library/goptions.ml
+++ b/library/goptions.ml
@@ -238,7 +238,8 @@ open Lib
let declare_option cast uncast
{ optsync=sync; optname=name; optkey=key; optread=read; optwrite=write } =
- check_key key;
+ check_key key;
+ let default = read() in
let write = if sync then
let (decl_obj,_) =
declare_object {(default_object (nickname key)) with
@@ -248,7 +249,7 @@ let declare_option cast uncast
let _ = declare_summary (nickname key)
{freeze_function = read;
unfreeze_function = write;
- init_function = (let default = read() in fun () -> write default);
+ init_function = (fun () -> write default);
survive_section = true}
in
fun v -> add_anonymous_leaf (decl_obj v)