-
Notifications
You must be signed in to change notification settings - Fork 12
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
10 changed files
with
120 additions
and
32 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
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,24 @@ | ||
(* autogenerated from github.com/goose-lang/goose/testdata/examples/externalglobals *) | ||
From New.golang Require Import defn. | ||
From New.code Require github_com.goose_lang.goose.testdata.examples.unittest. | ||
|
||
From New Require Import disk_prelude. | ||
|
||
(* go: g.go:7:6 *) | ||
Definition f : val := | ||
rec: "f" <> := | ||
exception_do (let: "$r0" := #(W64 11) in | ||
do: ((globals.get unittest.GlobalX #()) <-[uint64T] "$r0")). | ||
|
||
Definition pkg_name' : string := "github.com/goose-lang/goose/testdata/examples/externalglobals". | ||
|
||
Definition define' : val := | ||
rec: "define'" <> := | ||
exception_do (do: #()). | ||
|
||
Definition initialize' : val := | ||
rec: "initialize'" <> := | ||
globals.package_init pkg_name' (λ: <>, | ||
exception_do (do: unittest.initialize';;; | ||
do: (define' #())) | ||
). |
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,9 @@ | ||
package externalglobals | ||
|
||
import ( | ||
"github.com/goose-lang/goose/testdata/examples/unittest" | ||
) | ||
|
||
func f() { | ||
unittest.GlobalX = 11 | ||
} |
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
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
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