Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fstar val instances #718

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions engine/backends/fstar/fstar_backend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1338,8 +1338,10 @@ struct
in
let body = F.term @@ F.AST.Record (None, fields) in
let tcinst = F.term @@ F.AST.Var FStar_Parser_Const.tcinstance_lid in
F.decls ~fsti:ctx.interface_mode ~attrs:[ tcinst ]
@@ F.AST.TopLevelLet (NoLetQualifier, [ (pat, body) ])
[
F.decl ~fsti:false ~attrs:[ tcinst ] @@ F.AST.TopLevelLet (NoLetQualifier, [ (pat, body) ]);
F.decl ~fsti:true ~attrs:[ tcinst ] @@ F.AST.Val (name, typ);
]
| Quote quote ->
let fstar_opts =
Attrs.find_unique_attr e.attrs ~f:(function
Expand Down
2 changes: 1 addition & 1 deletion engine/lib/dependencies.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module Make (F : Features.T) = struct
@ v#visit_ty () self_ty
@ v#visit_global_ident () (fst of_trait)
@ concat_map (v#visit_generic_value ()) (snd of_trait)
@ concat_map (v#visit_impl_item ()) items
(* @ concat_map (v#visit_impl_item ()) items *)
@ concat_map
(fun (ie, ii) ->
v#visit_impl_expr () ie @ v#visit_impl_ident () ii)
Expand Down
5 changes: 5 additions & 0 deletions proof-libs/fstar/core/Core.Default.fsti
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Core.Default

class t_Default (t: Type0) = {
v_default: unit -> t;
}
Loading