-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5574 from unisonweb/fix/sandboxed-pre-eval
- Loading branch information
Showing
2 changed files
with
82 additions
and
0 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,62 @@ | ||
``` ucm :hide | ||
scratch/main> builtins.mergeio | ||
``` | ||
|
||
``` unison | ||
stdOut = stdHandle StdOut | ||
putText h t = match putBytes.impl h (Text.toUtf8 t) with | ||
Left e -> raise e | ||
_ -> () | ||
printLine t = | ||
putText stdOut t | ||
putText stdOut "\n" | ||
``` | ||
|
||
``` ucm :added-by-ucm | ||
Loading changes detected in scratch.u. | ||
I found and typechecked these definitions in scratch.u. If you | ||
do an `add` or `update`, here's how your codebase would | ||
change: | ||
⍟ These new definitions are ok to `add`: | ||
printLine : Text ->{IO, Exception} () | ||
putText : Handle -> Text ->{IO, Exception} () | ||
stdOut : Handle | ||
``` | ||
|
||
``` ucm | ||
scratch/main> update | ||
Okay, I'm searching the branch for code that needs to be | ||
updated... | ||
Done. | ||
``` | ||
|
||
``` unison | ||
hmmm = {{ I'll try {printLine}. That's a good trick. }} | ||
``` | ||
|
||
``` ucm :added-by-ucm | ||
Loading changes detected in scratch.u. | ||
I found and typechecked these definitions in scratch.u. If you | ||
do an `add` or `update`, here's how your codebase would | ||
change: | ||
⍟ These new definitions are ok to `add`: | ||
hmmm : Doc2 | ||
``` | ||
|
||
``` ucm | ||
scratch/main> display hmmm | ||
I'll try printLine. That's a good trick. | ||
``` |