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

Implementing map_seal and bind_seal primitive operators #3074

Merged
merged 11 commits into from
Nov 1, 2023
Prev Previous commit
Next Next commit
NBETerm: add set_type for embeddings
  • Loading branch information
mtzguido committed Oct 30, 2023
commit f3f41cd9f53905b33414808eb5922e6e9d90be93
1 change: 1 addition & 0 deletions src/typechecker/FStar.TypeChecker.NBETerm.fst
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ let translate_cb cbs t = cbs.translate t
let embed (e:embedding 'a) (cb:nbe_cbs) (x:'a) : t = e.em cb x
let unembed (e:embedding 'a) (cb:nbe_cbs) (trm:t) : option 'a = e.un cb trm
let type_of (e:embedding 'a) : t = e.typ
let set_type (ty:t) (e:embedding 'a) : embedding 'a = { e with typ = ty }


let mk_emb em un typ et = {em = em; un = un; typ = typ; emb_typ=et}
Expand Down
1 change: 1 addition & 0 deletions src/typechecker/FStar.TypeChecker.NBETerm.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ val embed : embedding 'a -> nbe_cbs -> 'a -> t
val unembed : embedding 'a -> nbe_cbs -> t -> option 'a
val lazy_unembed_lazy_kind (#a:Type) (k:lazy_kind) (x:t) : option a
val type_of : embedding 'a -> t
val set_type : t -> embedding 'a -> embedding 'a

val e_bool : embedding bool
val e_string : embedding string
Expand Down