diff options
Diffstat (limited to 'plugins/field')
-rw-r--r-- | plugins/field/LegacyField.v | 4 | ||||
-rw-r--r-- | plugins/field/LegacyField_Compl.v | 4 | ||||
-rw-r--r-- | plugins/field/LegacyField_Tactic.v | 4 | ||||
-rw-r--r-- | plugins/field/LegacyField_Theory.v | 4 | ||||
-rw-r--r-- | plugins/field/field.ml4 | 16 |
5 files changed, 12 insertions, 20 deletions
diff --git a/plugins/field/LegacyField.v b/plugins/field/LegacyField.v index 9017f8d5..011bc81e 100644 --- a/plugins/field/LegacyField.v +++ b/plugins/field/LegacyField.v @@ -1,13 +1,11 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: LegacyField.v 14641 2011-11-06 11:59:10Z herbelin $ *) - Require Export LegacyField_Compl. Require Export LegacyField_Theory. Require Export LegacyField_Tactic. diff --git a/plugins/field/LegacyField_Compl.v b/plugins/field/LegacyField_Compl.v index 52e049a5..97c70c0e 100644 --- a/plugins/field/LegacyField_Compl.v +++ b/plugins/field/LegacyField_Compl.v @@ -1,13 +1,11 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: LegacyField_Compl.v 14641 2011-11-06 11:59:10Z herbelin $ *) - Require Import List. Definition assoc_2nd := diff --git a/plugins/field/LegacyField_Tactic.v b/plugins/field/LegacyField_Tactic.v index f6626e4a..810443f8 100644 --- a/plugins/field/LegacyField_Tactic.v +++ b/plugins/field/LegacyField_Tactic.v @@ -1,13 +1,11 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: LegacyField_Tactic.v 14641 2011-11-06 11:59:10Z herbelin $ *) - Require Import List. Require Import LegacyRing. Require Export LegacyField_Compl. diff --git a/plugins/field/LegacyField_Theory.v b/plugins/field/LegacyField_Theory.v index 8d10bc8e..20ffbc27 100644 --- a/plugins/field/LegacyField_Theory.v +++ b/plugins/field/LegacyField_Theory.v @@ -1,13 +1,11 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: LegacyField_Theory.v 14641 2011-11-06 11:59:10Z herbelin $ *) - Require Import List. Require Import Peano_dec. Require Import LegacyRing. diff --git a/plugins/field/field.ml4 b/plugins/field/field.ml4 index 37aa457d..9e4f4d74 100644 --- a/plugins/field/field.ml4 +++ b/plugins/field/field.ml4 @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) @@ -8,8 +8,6 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: field.ml4 14641 2011-11-06 11:59:10Z herbelin $ *) - open Names open Pp open Proof_type @@ -39,18 +37,20 @@ let constr_of_opt a opt = | None -> mkApp (init_constant "None",[|ac3|]) | Some f -> mkApp (init_constant "Some",[|ac3;constr_of f|]) +module Cmap = Map.Make(struct type t = constr let compare = constr_ord end) + (* Table of theories *) -let th_tab = ref (Gmap.empty : (constr,constr) Gmap.t) +let th_tab = ref (Cmap.empty : constr Cmap.t) let lookup env typ = - try Gmap.find typ !th_tab + try Cmap.find typ !th_tab with Not_found -> errorlabstrm "field" (str "No field is declared for type" ++ spc() ++ Printer.pr_lconstr_env env typ) let _ = - let init () = th_tab := Gmap.empty in + let init () = th_tab := Cmap.empty in let freeze () = !th_tab in let unfreeze fs = th_tab := fs in Summary.declare_summary "field" @@ -59,7 +59,7 @@ let _ = Summary.init_function = init } let load_addfield _ = () -let cache_addfield (_,(typ,th)) = th_tab := Gmap.add typ th !th_tab +let cache_addfield (_,(typ,th)) = th_tab := Cmap.add typ th !th_tab let subst_addfield (subst,(typ,th as obj)) = let typ' = subst_mps subst typ in let th' = subst_mps subst th in @@ -67,7 +67,7 @@ let subst_addfield (subst,(typ,th as obj)) = (typ',th') (* Declaration of the Add Field library object *) -let (in_addfield,out_addfield)= +let in_addfield : types * constr -> Libobject.obj = Libobject.declare_object {(Libobject.default_object "ADD_FIELD") with Libobject.open_function = (fun i o -> if i=1 then cache_addfield o); Libobject.cache_function = cache_addfield; |