Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
(refactor) Remove containsb, use in_dec instead
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <[email protected]>
  • Loading branch information
jeromesimeon committed Aug 15, 2018
1 parent 8d1eb2b commit 8d8208e
Show file tree
Hide file tree
Showing 5 changed files with 22,930 additions and 20,378 deletions.
9 changes: 0 additions & 9 deletions mechanization/Common/Utils/Misc.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ Require Import String.
Require Import List.

Section Misc.
Fixpoint containsb (x : string) (ls : list string) : bool :=
match ls with
| nil => false
| x'::ls' =>
if String.string_dec x x'
then true
else containsb x ls'
end.

Definition multi_append {A} separator (f:A -> string) (elems:list A) : string :=
match elems with
| nil => ""
Expand Down
2 changes: 1 addition & 1 deletion mechanization/Translation/ErgotoErgoC.v
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ Section ErgotoErgoC.
| DImport prov import => esuccess (nil, ctxt)
| DType prov ergo_type =>
let name := ergo_type.(type_declaration_name) in
if containsb name (map type_declaration_name
if in_dec string_dec name (map type_declaration_name
(ctxt.(compilation_context_new_type_decls) ++
ctxt.(compilation_context_type_decls))) then
efailure (ETypeError prov ("Cannot redefine type `" ++ name ++ "'"))
Expand Down
15,176 changes: 8,017 additions & 7,159 deletions packages/ergo-cli/lib/ergoc-lib.js

Large diffs are not rendered by default.

13,886 changes: 7,372 additions & 6,514 deletions packages/ergo-cli/lib/ergotop-lib.js

Large diffs are not rendered by default.

14,235 changes: 7,540 additions & 6,695 deletions packages/ergo-compiler/lib/ergo-core.js

Large diffs are not rendered by default.

0 comments on commit 8d8208e

Please sign in to comment.