diff options
-rw-r--r-- | ide/coq.ml | 21 | ||||
-rw-r--r-- | ide/coq_commands.ml | 2 | ||||
-rw-r--r-- | ide/coqide.ml | 11 | ||||
-rw-r--r-- | ide/highlight.mll | 26 | ||||
-rw-r--r-- | ide/utf8.v | 4 |
5 files changed, 36 insertions, 28 deletions
diff --git a/ide/coq.ml b/ide/coq.ml index cc060da42..ac28997d5 100644 --- a/ide/coq.ml +++ b/ide/coq.ml @@ -41,13 +41,20 @@ let init () = (* To hide goal in lower window. Problem: should not hide "xx is assumed" messages *) +(**) Options.make_silent true; +(**) Coqtop.init_ide () let i = ref 0 let version () = + let date = + if Glib.Utf8.validate Coq_config.date + then Coq_config.date + else "<date not printable>" + in Printf.sprintf "The Coq Proof Assistant, version %s (%s)\ \nConfigured on %s\ @@ -55,7 +62,7 @@ let version () = \nGtk version is %s\ \nThis is the %s version (%s is the best one for this architecture and OS)\ \n" - Coq_config.version Coq_config.date Coq_config.compile_date + Coq_config.version date Coq_config.compile_date Coq_config.arch Sys.os_type (let x,y,z = GMain.Main.version in Printf.sprintf "%d.%d.%d" x y z) (if Mltop.get () = Mltop.Native then "native" else "bytecode") @@ -134,11 +141,19 @@ let interp s = | VernacCheckMayEval _ | VernacGlobalCheck _ | VernacPrint _ - | VernacSearch _ -> - !flash_info ~delay:1000000 "Warning: query commands should not be inserted in scripts" + | VernacSearch _ + -> !flash_info + "Warning: query commands should not be inserted in scripts" + | VernacDefinition (_,_,DefineBody _,_) + | VernacInductive _ + | VernacFixpoint _ + | VernacCoFixpoint _ + | VernacEndProof _ + -> Options.make_silent false | _ -> () end; Vernac.raw_do_vernac (Pcoq.Gram.parsable (Stream.of_string s)); + Options.make_silent true; prerr_endline ("...Done with interp of : "^s); last diff --git a/ide/coq_commands.ml b/ide/coq_commands.ml index 640d1c383..7353a1bf6 100644 --- a/ide/coq_commands.ml +++ b/ide/coq_commands.ml @@ -67,8 +67,6 @@ let commands = [ "Hint Unfold"; "Hypothesis";]; ["Identity Coercion"; - "Implicit Arguments Off."; - "Implicit Arguments On."; "Implicits"; "Inductive"; "Infix"; diff --git a/ide/coqide.ml b/ide/coqide.ml index 02025bfbb..39dcd0ffa 100644 --- a/ide/coqide.ml +++ b/ide/coqide.ml @@ -3213,7 +3213,7 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); ~pixbuf:startup_image; b#insert ~iter:b#start_iter "\t\t"; with _ -> ()); - b#insert + let about_string = "\nCoqIDE: an Integrated Development Environment for Coq\n\ \nMain author : Benjamin Monate\ \nContributors : Jean-Christophe Filliâtre\ @@ -3221,8 +3221,13 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); \nFeature wish or bug report: use Web interface\n\ \n\thttp://coq.inria.fr/bin/coq-bugs\n\ \nVersion information\ - \n-------------------\n"; - b#insert ((Coq.version ())) + \n-------------------\n" + in + if Glib.Utf8.validate about_string + then b#insert about_string; + let coq_version = Coq.version () in + if Glib.Utf8.validate coq_version + then b#insert coq_version; in about tv2#buffer; diff --git a/ide/highlight.mll b/ide/highlight.mll index 9c0e5abee..4bc200ada 100644 --- a/ide/highlight.mll +++ b/ide/highlight.mll @@ -29,27 +29,19 @@ let identchar = let ident = firstchar identchar* let keyword = - "Add" | "AddPath" | "Chapter" | "Check" | - "CoInductive" | "Compile" | "Defined" | - "End" | "Export" | "Extraction" | "Fact" | "Fix" | "Global" | - "Grammar" | "Hint" | - "Hints" | ("Hints" space+ "Resolve") | - "Immediate" | "Implicits" | "Import" | - "Infix" | "Load" | "LoadPath" | "Local" | - "Match" | "Module" | "Module Type" | - "Mutual" | "Print" | "Proof" | "Qed" | - "Record" | "Recursive" | - ("Require" (space+ "Export")? space+ ident) | "Save" | "Scheme" | - "Section" | "Show" | "Syntactic" | "Syntax" | "Tactic" | - "Unset" | - ("Set" space+ "Implicit" space+ "Arguments") | - ("Implicit" space+ "Arguments" space+ ("On" | "Off")) | "Cases" + "Add" | "CoInductive" | "Defined" | + "End" | "Export" | "Extraction" | "Hint" | + "Implicits" | "Import" | + "Infix" | "Load" | "match" | "Module" | "Module Type" | + "Proof" | "Qed" | + "Record" | "Require" | "Save" | "Scheme" | + "Section" | "Unset" | + "Set" let declaration = "Lemma" | "Axiom" | "CoFixpoint" | "Definition" | - ("Tactic" space+ "Definition") | "Fixpoint" | "Hypothesis" | - "Inductive" | "Parameter" | "Remark" | "Theorem" | + "Inductive" | "Parameter" | "Theorem" | "Variable" | "Variables" rule next_order = parse diff --git a/ide/utf8.v b/ide/utf8.v index 8428d2e3c..049a1f2bc 100644 --- a/ide/utf8.v +++ b/ide/utf8.v @@ -21,9 +21,7 @@ Notation "∃ x : t , P" := (exists x : t, P) (at level 200, x ident) : type_sco Notation "x ∨ y" := (x \/ y) (at level 85, right associativity) : type_scope. Notation "x ∧ y" := (x /\ y) (at level 80, right associativity) : type_scope. -(* DOES NOT WORK Notation "x → y" := (x -> y) (at level 90, right associativity): type_scope. -*) Notation "x ↔ y" := (x <-> y) (at level 95, no associativity): type_scope. Notation "⌉ x" := (~x) (at level 75, right associativity) : type_scope. @@ -40,7 +38,7 @@ Notation "x ≥ y" := (ge x y) (at level 70, no associativity). (* test *) (* -Goal ∀ x, (∃ y , x ≥ y + 1) ∨ x ≤ 0. +Goal ∀ x, True -> (∃ y , x ≥ y + 1) ∨ x ≤ 0. *) (* Integer Arithmetic *) |