1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(* $Id: dyn.ml 5920 2004-07-16 20:01:26Z herbelin $ *)
13
(* Dynamics, programmed with DANGER !!! *)
15
type t = string * Obj.t
17
let dyntab = ref ([] : string list)
20
if List.mem s !dyntab then
21
anomaly ("Dyn.create: already declared dynamic " ^ s);
22
dyntab := s :: !dyntab;
23
((fun v -> (s,Obj.repr v)),
25
if s = s' then Obj.magic rv else failwith "dyn_out"))