Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
alphaLib
Commits
29206bde
Commit
29206bde
authored
Feb 20, 2017
by
POTTIER Francois
Browse files
Changed [lookup] to take [env] first.
parent
f4786cb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/BindingFormsUnbound.ml
View file @
29206bde
...
...
@@ -26,7 +26,8 @@
The combinator [inner(p)] can be viewed as sugar for [rebind(outer(p))].
Our [rebind(p)] takes just one argument. Weirich et al.'s [rebind],
which takes two arguments, is emulated by writing [p1 * rebind(p2)]. *)
which takes two arguments, is emulated by writing [p1 * rebind(p2)].
This encoding relies on the fact that pairs are traversed left-to-right. *)
(* -------------------------------------------------------------------------- *)
...
...
@@ -155,7 +156,7 @@ let check_recursive_permitted (penv : 'env penv) : unit =
class
virtual
[
'
self
]
map
=
object
(
self
:
'
self
)
method
private
virtual
extend
:
'
bn1
->
'
env
->
'
bn2
*
'
env
method
private
virtual
lookup
:
'
bn1
->
'
env
->
'
bn2
method
private
virtual
lookup
:
'
env
->
'
bn1
->
'
bn2
(* [visit_abstraction] initializes an enriched environment using the
auxiliary function [abstraction]. *)
...
...
@@ -182,7 +183,7 @@ class virtual ['self] map = object (self : 'self)
penv
.
current
:=
env
;
x2
|
Lookup
->
self
#
lookup
x1
env
self
#
lookup
env
x1
(* [inner(p)] can be viewed as sugar for [rebind(outer(p))]. Therefore, this
code should ideally be generated. *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment