Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alphaLib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
POTTIER Francois
alphaLib
Commits
29206bde
Commit
29206bde
authored
8 years ago
by
POTTIER Francois
Browse files
Options
Downloads
Patches
Plain Diff
Changed [lookup] to take [env] first.
parent
f4786cb6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/BindingFormsUnbound.ml
+4
-3
4 additions, 3 deletions
src/BindingFormsUnbound.ml
with
4 additions
and
3 deletions
src/BindingFormsUnbound.ml
+
4
−
3
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. *)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment