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
C
cduce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cduce
cduce
Commits
fd3c42d6
Commit
fd3c42d6
authored
Jun 22, 2014
by
Julien Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEBUG] Add typed and lambda in debug directives
parent
33a1a15d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
1 deletion
+14
-1
compile/compile.mli
compile/compile.mli
+1
-0
driver/cduce.ml
driver/cduce.ml
+9
-1
parser/ast.ml
parser/ast.ml
+2
-0
parser/parser.ml
parser/parser.ml
+2
-0
No files found.
compile/compile.mli
View file @
fd3c42d6
...
...
@@ -12,6 +12,7 @@ val empty_toplevel : env
val
find
:
id
->
env
->
var_loc
val
find_slot
:
id
->
env
->
int
val
compile_expr
:
env
->
Typed
.
texpr
->
Lambda
.
expr
*
int
val
compile_eval_expr
:
env
->
Typed
.
texpr
->
Value
.
t
val
comp_unit
:
...
...
driver/cduce.ml
View file @
fd3c42d6
...
...
@@ -234,7 +234,15 @@ let debug ppf tenv cenv = function
with
|
Exit
->
Format
.
fprintf
ppf
"Non constant@."
|
Not_found
->
Format
.
fprintf
ppf
"Empty@."
)
|
`Typed
e
->
Format
.
fprintf
ppf
"[DEBUG:typed]@."
;
let
r
,
_
=
Typer
.
type_expr
tenv
e
in
Format
.
fprintf
ppf
"%a
\n
"
Typed
.
Print
.
pp_typed
r
|
`Lambda
e
->
Format
.
fprintf
ppf
"[DEBUG:typed]@."
;
let
r
,
_
=
Typer
.
type_expr
tenv
e
in
let
lambdaexpr
,
lsize
=
Compile
.
compile_expr
Compile
.
empty_toplevel
r
in
Format
.
fprintf
ppf
"%a
\n
"
Lambda
.
Print
.
pp_lambda
lambdaexpr
let
flush_ppf
ppf
=
Format
.
fprintf
ppf
"@."
...
...
parser/ast.ml
View file @
fd3c42d6
...
...
@@ -26,6 +26,8 @@ and debug_directive =
|
`Compile
of
ppat
*
ppat
list
|
`Subtype
of
ppat
*
ppat
|
`Single
of
ppat
|
`Typed
of
pexpr
|
`Lambda
of
pexpr
]
and
toplevel_directive
=
[
`Quit
...
...
parser/parser.ml
View file @
fd3c42d6
...
...
@@ -216,6 +216,8 @@ EXTEND Gram
|
IDENT
"sample"
;
t
=
pat
->
`Sample
t
|
IDENT
"subtype"
;
t1
=
pat
;
t2
=
pat
->
`Subtype
(
t1
,
t2
)
|
IDENT
"single"
;
t
=
pat
->
`Single
t
|
IDENT
"typed"
;
e
=
expr
->
`Typed
e
|
IDENT
"lambda"
;
e
=
expr
->
`Lambda
e
]
];
...
...
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