Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alphaLib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
POTTIER Francois
alphaLib
Commits
7d3132ef
Commit
7d3132ef
authored
Feb 15, 2017
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Progress on [Unbound].
parent
7b9b151a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
6 deletions
+28
-6
src/Unbound.ml
src/Unbound.ml
+28
-6
No files found.
src/Unbound.ml
View file @
7d3132ef
...
...
@@ -16,6 +16,9 @@ type 'env outside_rec_penv =
type
'
p
abstraction
=
'
p
type
'
bn
binder
=
'
bn
type
'
t
outer
=
'
t
...
...
@@ -30,7 +33,7 @@ type 'p recursive =
'p
*)
class
virtual
[
'
self
]
map
=
object
(
self
:
'
self
)
class
virtual
[
'
self
]
lib
map
=
object
(
self
:
'
self
)
method
private
virtual
extend
:
'
bn1
->
'
env
->
'
bn2
*
'
env
...
...
@@ -48,12 +51,18 @@ class virtual ['self] map = object (self : 'self)
let
env
=
penv
.
extra
in
visit_t
env
t1
method
private
visit_'bn
:
'
extra
.
(
'
env
,
'
extra
)
penv
->
'
bn1
->
'
bn2
=
fun
penv
x1
->
let
env
=
!
(
penv
.
current
)
in
method
private
visit_binder
:
'
extra
.
(
'
env
ref
->
'
bn1
->
'
bn2
)
->
(
'
env
,
'
extra
)
penv
->
'
bn1
binder
->
'
bn2
binder
=
fun
visit_bn
penv
x1
->
visit_bn
penv
.
current
x1
method
private
visit_'bn
:
'
env
ref
->
'
bn1
->
'
bn2
=
fun
current
x1
->
let
env
=
!
current
in
let
x2
,
env
=
self
#
extend
x1
env
in
penv
.
current
:=
env
;
current
:=
env
;
x2
method
private
visit_rebind
:
'
p1
'
p2
'
q1
'
q2
.
...
...
@@ -94,6 +103,19 @@ class virtual ['self] map = object (self : 'self)
end
type
(
'
p
,
'
t
)
bind
=
((
'
p
,
'
t
outer
)
rebind
)
abstraction
[
@@
deriving
visitors
{
variety
=
"map"
;
name
=
"bind_map"
;
ancestors
=
[
"libmap"
];
public
=
[]
}]
type
(
'
bn
,
'
term
)
tele
=
|
TeleNil
|
TeleCons
of
(
'
bn
binder
*
'
term
outer
,
(
'
bn
,
'
term
)
tele
)
rebind
[
@@
deriving
visitors
{
variety
=
"map"
;
name
=
"tele_map"
;
ancestors
=
[
"libmap"
];
public
=
[]
}]
type
(
'
bn
,
'
fn
)
term
=
|
TVar
of
'
fn
|
TPi
of
((
'
bn
,
(
'
bn
,
'
fn
)
term
)
tele
,
(
'
bn
,
'
fn
)
term
)
bind
(*
type 'bn pat =
| PZero
...
...
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