Skip to content

Commit

Permalink
Merge pull request #3569 from mtzguido/nits2
Browse files Browse the repository at this point in the history
Some library reorg
  • Loading branch information
mtzguido authored Oct 15, 2024
2 parents ad0961b + 3f8b702 commit 28d2213
Show file tree
Hide file tree
Showing 26 changed files with 74 additions and 34 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion ocaml/fstar-lib/generated/FStarC_Parser_Const.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ocaml/fstar-lib/generated/FStar_InteractiveHelpers_Base.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ocaml/fstar-lib/generated/FStar_Reflection_V1_Formula.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ocaml/fstar-lib/generated/FStar_Reflection_V2_Formula.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ocaml/fstar-lib/generated/FStar_Tactics_MkProjectors.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ocaml/fstar-lib/generated/FStar_Tactics_NamedView.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ocaml/fstar-lib/generated/FStar_Tactics_Parametricity.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ocaml/fstar-lib/generated/FStar_Tactics_PatternMatching.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ocaml/fstar-lib/generated/FStar_Tactics_Print.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ocaml/fstar-lib/generated/FStar_Tactics_V1_Derived.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions ocaml/fstar-lib/generated/FStar_Tactics_V2_Derived.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/parser/FStarC.Parser.Const.fst
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ let fext_on_dom_g_lid = fext_lid "on_dom_g"

let sealed_lid = p2l ["FStar"; "Sealed"; "sealed"]
let seal_lid = p2l ["FStar"; "Sealed"; "seal"]
let unseal_lid = p2l ["FStar"; "Tactics"; "Unseal"; "unseal"] (* In a separate module due to the mention of TAC *)
let unseal_lid = p2l ["FStar"; "Stubs"; "Tactics"; "Unseal"; "unseal"] (* In a separate module due to the mention of TAC *)
let map_seal_lid = p2l ["FStar"; "Sealed"; "map_seal"]
let bind_seal_lid = p2l ["FStar"; "Sealed"; "bind_seal"]
let tref_lid = p2l ["FStar"; "Stubs"; "Tactics"; "Types"; "tref"]
Expand Down
1 change: 1 addition & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ALL_TEST_DIRS += typeclasses
ALL_TEST_DIRS += vale
ALL_TEST_DIRS += hacl
ALL_TEST_DIRS += simple_hello
ALL_TEST_DIRS += dune_hello
HAS_OCAML := $(shell which ocamlfind 2>/dev/null)

ifneq (,$(HAS_OCAML))
Expand Down
3 changes: 3 additions & 0 deletions tests/dune_hello/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.ml
_build
lib
5 changes: 5 additions & 0 deletions tests/dune_hello/Hello.fst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Hello

open FStar.IO

let _ = print_string "Hi!\n"
15 changes: 15 additions & 0 deletions tests/dune_hello/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FSTAR_EXE ?= ../../bin/fstar.exe

.PHONY: all
all: run

Hello.ml: Hello.fst
$(FSTAR_EXE) --codegen OCaml Hello.fst --extract Hello

bin/hello.exe: Hello.ml
$(FSTAR_EXE) --ocamlenv dune build @install --profile=release
$(FSTAR_EXE) --ocamlenv dune install --prefix=.

.PHONY: run
run: bin/hello.exe
./bin/hello.exe | grep "Hi!"
11 changes: 11 additions & 0 deletions tests/dune_hello/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(executable
(name hello)
(public_name hello.exe)
(libraries fstar.lib)
(modes native)
)
(env
(_
(bin_annot false)
(flags (:standard -w -A)))
)
7 changes: 7 additions & 0 deletions tests/dune_hello/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(lang dune 3.8)
(name hello)

(package
(name hello)
(synopsis "An example F* application")
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(**
The [unseal] primitive to observe sealed values.
*)
module FStar.Tactics.Unseal
module FStar.Stubs.Tactics.Unseal

open FStar.Sealed
open FStar.Tactics.Effect
Expand Down
3 changes: 1 addition & 2 deletions ulib/FStar.Stubs.Tactics.V1.Builtins.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ open FStar.Stubs.Reflection.V1.Data
open FStar.Reflection.Const
open FStar.Tactics.Effect
open FStar.Stubs.Tactics.Types

include FStar.Tactics.Unseal
include FStar.Stubs.Tactics.Unseal

(** [top_env] returns the environment where the tactic started running.
* This works even if no goals are present. *)
Expand Down
3 changes: 1 addition & 2 deletions ulib/FStar.Stubs.Tactics.V2.Builtins.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ open FStar.Stubs.Reflection.V2.Builtins
open FStar.Tactics.Effect
open FStar.Tactics.Effect
open FStar.Stubs.Tactics.Types

include FStar.Tactics.Unseal
include FStar.Stubs.Tactics.Unseal

(** Resolve unification variable indirections at the top of the term. *)
val compress : term -> Tac term
Expand Down
2 changes: 1 addition & 1 deletion ulib/FStar.Tactics.CanonCommMonoidSimple.fst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ open FStar.Tactics.V2.Bare
open FStar.Classical
open FStar.Tactics.CanonCommSwaps

let term_eq = FStar.Tactics.V2.term_eq_old
let term_eq = FStar.Stubs.Tactics.V2.Builtins.term_eq_old

(* A simple expression canonizer for commutative monoids.
For a canonizer with more features see FStar.Tactics.CanonCommMonoid.fst.
Expand Down
2 changes: 1 addition & 1 deletion ulib/FStar.Tactics.Parametricity.fst
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ let param_inductive (se:sigelt) (fv0 fv1 : fv) : Tac decls =
//Tactics.Util.iter (fun bv -> dump ("param bv = " ^ binder_to_string bv)) param_bs;
let typ = mk_e_app (param' s typ) [replace_by s false orig; replace_by s true orig] in
(* dump ("new typ = " ^ term_to_string typ); *)
let ctors = Tactics.V2.Bare.map (param_ctor nm s) ctors in
let ctors = Tactics.Util.map (param_ctor nm s) ctors in
let se = Sg_Inductive {nm=inspect_fv fv1; univs; params=param_bs; typ; ctors} in
(* dump ("param_ind : " ^ term_to_string (quote se)); *)
[pack_sigelt se]
Expand Down

0 comments on commit 28d2213

Please sign in to comment.