You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tahina Ramananandro (professional account) edited this page Dec 2, 2016
·
6 revisions
Similarly to the OCaml let open construct, we have:
let example1 =
let open FStar.List in
rev (append [] [])
let example2 =
FStar.List.(rev (append [] []))
The two notations exactly have the same meaning.
Modules or namespaces must be either fully qualified, or be a module abbrev, such as in the following examples, which have exactly the same meaning:
module L = FStar.List
let example1 =
let open L in
rev (append [] [])
let example2 =
L.(rev (append [] []))
However, you cannot do the following:
open FStar
let example3 =
List.(rev (append [] []))
because List would be treated as the namespace List, not FStar.List as one might think. (In other words, module name M in let open M is rewritten only with module abbrevs, not with namespaces.)