Skip to content

Commit

Permalink
Comment on extract_as being recursive.
Browse files Browse the repository at this point in the history
  • Loading branch information
gebner committed Sep 26, 2024
1 parent 1ee7ce5 commit b887b0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/extraction/FStar.Extraction.ML.Modul.fst
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,8 @@ let mark_sigelt_erased (se:sigelt) (g:uenv) : uenv =
let fixup_sigelt_extract_as se =
match se.sigel, find_map se.sigattrs N.is_extract_as_attr with
| Sig_let {lids; lbs=(_, [lb])}, Some impl ->
// The specified implementation can be recursive,
// to be on the safe side we always mark the replaced sigelt as recursive.
{se with sigel = Sig_let {lids; lbs=(true, [{lb with lbdef = impl}])}}
| _ -> se

Expand Down
2 changes: 2 additions & 0 deletions ulib/FStar.ExtractAs.fst
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ open FStar.Stubs.Reflection.Types
and most likely cause the extracted program to crash.
Note that the argument needs to be a literal quotation.
The implementation can be recursive,
but then you need to construct the attribute via a tactic.
*)
let extract_as (impl: term) = ()

0 comments on commit b887b0f

Please sign in to comment.