forked from tweag/linear-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use case: stateful interpreter (`eval`) for C-like expressions `e`: ```haskell let Ur value = HashMap.empty capacity (\ env -> move (evalState (eval e) env)) ``` This pattern breaks the "jail" set by the type signature of `HashMap`-allocation: ```haskell empty :: Int -> (HashMap k v %1 -> Ur b) %1 -> Ur b ``` `HashMap` is not `Movable` but `Consumable`, so we can get rid of it before `move`ing the result to `Ur`.
- Loading branch information
1 parent
d84384b
commit d15b300
Showing
3 changed files
with
16 additions
and
1 deletion.
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