-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module IfDefKrml | ||
open FStar.HyperStack.ST | ||
open LowStar.Buffer | ||
[@@CIfDef] | ||
assume | ||
val flag : bool | ||
|
||
|
||
let something_effectful (x:bool) : Stack bool (requires λ _ → ⊤) (ensures (λ _ _ _ → ⊤)) = x | ||
|
||
let test (x y:bool) = | ||
let z = | ||
if flag | ||
then false | ||
else let aa = something_effectful x in | ||
aa | ||
in | ||
let z = | ||
if flag | ||
then false | ||
else let aa = something_effectful z in | ||
aa | ||
in z | ||
|
||
let main () = if test true true then 0l else 1l |