wip: call/cc = capture/cc × invoke/cc
This commit is contained in:
1 parent
276c2c1249
commit
57b1cc830d
7 files changed
+21
-42
No files matched your search
@@ -83,9 +83,9 @@ data Prim e
|
||||
| PrimMakeClosure { code :: e, env :: List e }
|
||||
| PrimEnv
|
||||
| PrimEnvRef Int
|
||||
| PrimEnvCode e
|
||||
| PrimCallCC e
|
||||
| PrimCaptureCC
|
||||
| PrimInvokeCC e (List e)
|
||||
| PrimValues (List e)
|
||||
| PrimCallWithValues e e
|
||||
deriving stock (Show, Generic, Functor, Foldable, Traversable, Data, Eq)
|
||||
@@ -170,9 +170,9 @@ primDatumIso namefn a = S.match
|
||||
$ S.With (. ht1' "make-closure")
|
||||
$ S.With (. ht0 "env")
|
||||
$ S.With (. S.headTagged1 (namefn "env-ref") S.int)
|
||||
$ S.With (. ht1 "env-code")
|
||||
$ S.With (. ht1 "call/cc")
|
||||
$ S.With (. ht0 "capture/cc")
|
||||
$ S.With (. ht1' "invoke/cc")
|
||||
$ S.With (. ht0' "values")
|
||||
$ S.With (. ht2 "call-with-values")
|
||||
$ S.End
|
||||
|
||||
Reference in new issue
Block a user