Skip to content
Snippets Groups Projects
Commit 12d81a67 authored by Basile Desloges's avatar Basile Desloges
Browse files

REVUE 1 : suppression de Error.nb_not_yet et Error.nb_untypable

parent 16ae8e68
No related branches found
No related tags found
No related merge requests found
...@@ -41,8 +41,6 @@ module type S = sig ...@@ -41,8 +41,6 @@ module type S = sig
val print_not_yet: string -> unit val print_not_yet: string -> unit
val handle: ('a -> 'a) -> 'a -> 'a val handle: ('a -> 'a) -> 'a -> 'a
val generic_handle: ('a -> 'b) -> 'b -> 'a -> 'b val generic_handle: ('a -> 'b) -> 'b -> 'a -> 'b
val nb_untypable: unit -> int
val nb_not_yet: unit -> int
val retrieve_preprocessing: val retrieve_preprocessing:
string -> string ->
('a -> 'b or_error) -> ('a -> 'b or_error) ->
...@@ -56,24 +54,6 @@ module type S = sig ...@@ -56,24 +54,6 @@ module type S = sig
unit unit
end end
module Nb_typing =
State_builder.Ref
(Datatype.Int)
(struct
let name = "E_ACSL.Error.Nb_typing"
let default () = 0
let dependencies = [ Ast.self ]
end)
module Nb_not_yet =
State_builder.Ref
(Datatype.Int)
(struct
let name = "E_ACSL.Error.Nb_not_yet"
let default () = 0
let dependencies = [ Ast.self ]
end)
module Make_with_opt(P: sig val phase:Options.category option end): S = struct module Make_with_opt(P: sig val phase:Options.category option end): S = struct
include Exn_impl include Exn_impl
...@@ -85,9 +65,6 @@ module Make_with_opt(P: sig val phase:Options.category option end): S = struct ...@@ -85,9 +65,6 @@ module Make_with_opt(P: sig val phase:Options.category option end): S = struct
let not_yet msg = raise (make_not_yet msg) let not_yet msg = raise (make_not_yet msg)
let not_memoized () = raise (make_not_memoized ()) let not_memoized () = raise (make_not_memoized ())
let nb_untypable = Nb_typing.get
let nb_not_yet = Nb_not_yet.get
let pp_phase fmt phase = let pp_phase fmt phase =
match phase with match phase with
| Some phase -> | Some phase ->
...@@ -104,8 +81,7 @@ module Make_with_opt(P: sig val phase:Options.category option end): S = struct ...@@ -104,8 +81,7 @@ module Make_with_opt(P: sig val phase:Options.category option end): S = struct
in in
Options.warning Options.warning
~once:true ~current:true ~once:true ~current:true
"@[%s@ Ignoring annotation.@]" msg; "@[%s@ Ignoring annotation.@]" msg
Nb_not_yet.set (Nb_not_yet.get () + 1)
let print_not_yet msg = let print_not_yet msg =
do_print_not_yet P.phase msg do_print_not_yet P.phase msg
...@@ -123,7 +99,6 @@ module Make_with_opt(P: sig val phase:Options.category option end): S = struct ...@@ -123,7 +99,6 @@ module Make_with_opt(P: sig val phase:Options.category option end): S = struct
Options.warning Options.warning
~once:true ~current:true ~once:true ~current:true
"@[%s@ Ignoring annotation.@]" msg; "@[%s@ Ignoring annotation.@]" msg;
Nb_typing.set (Nb_typing.get () + 1);
res res
| Not_yet (phase, s) -> | Not_yet (phase, s) ->
do_print_not_yet phase s; do_print_not_yet phase s;
......
...@@ -73,12 +73,6 @@ module type S = sig ...@@ -73,12 +73,6 @@ module type S = sig
(** Run the closure with the given argument and handle potential errors. (** Run the closure with the given argument and handle potential errors.
Return the additional argument in case of errors. *) Return the additional argument in case of errors. *)
val nb_untypable: unit -> int
(** Number of untypable annotations. *)
val nb_not_yet: unit -> int
(** Number of not-yet-supported annotations. *)
val retrieve_preprocessing: val retrieve_preprocessing:
string -> string ->
('a -> 'b or_error) -> ('a -> 'b or_error) ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment