Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
7b0dc59e
Commit
7b0dc59e
authored
Jun 09, 2014
by
Julien Lopez
Browse files
Compilation fixes
parent
e69199a0
Changes
6
Hide whitespace changes
Inline
Side-by-side
compile/lambda.mli
View file @
7b0dc59e
...
@@ -77,5 +77,5 @@ type code_item =
...
@@ -77,5 +77,5 @@ type code_item =
type
code
=
code_item
list
type
code
=
code_item
list
module
Print
:
sig
module
Print
:
sig
val
lambda_to_string
:
Lambda
.
expr
->
string
val
lambda_to_string
:
expr
->
string
end
end
runtime/value.ml
View file @
7b0dc59e
...
@@ -352,7 +352,7 @@ let rec pp_value ppf = function
...
@@ -352,7 +352,7 @@ let rec pp_value ppf = function
|
XmlNs
(
_
,_,_,_,
sigma
)
->
Format
.
fprintf
ppf
"XmlNs(%a)"
pp_sigma
sigma
|
XmlNs
(
_
,_,_,_,
sigma
)
->
Format
.
fprintf
ppf
"XmlNs(%a)"
pp_sigma
sigma
|
Record
(
_
,
sigma
)
->
Format
.
fprintf
ppf
"Record(%a)"
pp_sigma
sigma
|
Record
(
_
,
sigma
)
->
Format
.
fprintf
ppf
"Record(%a)"
pp_sigma
sigma
|
Atom
(
a
)
->
Format
.
fprintf
ppf
"Atom(%a)"
Atoms
.
V
.
print
a
|
Atom
(
a
)
->
Format
.
fprintf
ppf
"Atom(%a)"
Atoms
.
V
.
print
a
|
Integer
(
i
)
->
Format
.
fprintf
ppf
"%d"
(
Big_int
.
int_of_big
_int
i
)
|
Integer
(
i
)
->
Format
.
fprintf
ppf
"%d"
(
Intervals
.
V
.
get
_int
i
)
|
Char
(
i
)
->
Format
.
fprintf
ppf
"'%c'"
(
Chars
.
V
.
to_char
i
)
|
Char
(
i
)
->
Format
.
fprintf
ppf
"'%c'"
(
Chars
.
V
.
to_char
i
)
|
Abstraction
(
None
,
_
,
sigma
)
->
|
Abstraction
(
None
,
_
,
sigma
)
->
Format
.
fprintf
ppf
"Abstraction(None,%a)"
pp_sigma
sigma
Format
.
fprintf
ppf
"Abstraction(None,%a)"
pp_sigma
sigma
...
@@ -362,7 +362,7 @@ let rec pp_value ppf = function
...
@@ -362,7 +362,7 @@ let rec pp_value ppf = function
pp_sigma
sigma
pp_sigma
sigma
|
Abstract
((
name
,
_
))
->
Format
.
fprintf
ppf
"Abstract(%s)"
name
|
Abstract
((
name
,
_
))
->
Format
.
fprintf
ppf
"Abstract(%s)"
name
|
String_latin1
(
_
,_,
s
,_
)
->
Format
.
fprintf
ppf
"
\"
%s
\"
"
s
|
String_latin1
(
_
,_,
s
,_
)
->
Format
.
fprintf
ppf
"
\"
%s
\"
"
s
|
String_utf8
(
_
,_,
s
,_
)
->
Format
.
fprintf
ppf
"
\"
%s
\"
"
s
|
String_utf8
(
_
,_,
s
,_
)
->
Format
.
fprintf
ppf
"
\"
%s
\"
"
(
Encodings
.
Utf8
.
get_str
s
)
|
Concat
(
v1
,
v2
)
->
|
Concat
(
v1
,
v2
)
->
Format
.
fprintf
ppf
"Concat(%a, %a)"
Format
.
fprintf
ppf
"Concat(%a, %a)"
pp_value
v1
pp_value
v1
...
...
types/patterns.ml
View file @
7b0dc59e
...
@@ -80,6 +80,28 @@ let print_node ppf n =
...
@@ -80,6 +80,28 @@ let print_node ppf n =
to_print
:=
n
::
!
to_print
;
to_print
:=
n
::
!
to_print
;
dump_print
ppf
dump_print
ppf
let
print_lst
f
ppf
l
=
let
rec
aux
ppf
=
function
|
[]
->
Format
.
fprintf
ppf
"@."
|
[
h
]
->
Format
.
fprintf
ppf
"%a"
f
h
|
h
::
t
->
Format
.
fprintf
ppf
"%a,%a"
f
h
aux
t
in
match
l
with
|
[]
->
Format
.
fprintf
ppf
""
|_
->
Format
.
fprintf
ppf
"%a"
aux
l
let
pp_v
ppf
(
id
,
name
)
=
Format
.
fprintf
ppf
"(%d,%s)"
(
Upool
.
int
id
)
(
Encodings
.
Utf8
.
to_string
name
)
let
pp_fv
ppf
fv
=
print_lst
pp_v
ppf
fv
let
pp_node
ppf
node
=
Format
.
fprintf
ppf
"id:%d; descr:[%a]; accept:[id:%d; descr:%a]; fv:[%a]"
node
.
id
print
node
.
descr
(
Types
.
id
node
.
accept
)
Types
.
Print
.
print
(
Types
.
descr
node
.
accept
)
pp_fv
node
.
fv
let
counter
=
ref
0
let
counter
=
ref
0
...
...
types/patterns.mli
View file @
7b0dc59e
...
@@ -25,6 +25,9 @@ val id: node -> int
...
@@ -25,6 +25,9 @@ val id: node -> int
val
descr
:
node
->
descr
val
descr
:
node
->
descr
val
fv
:
node
->
fv
val
fv
:
node
->
fv
(* For debugging *)
val
pp_node
:
Format
.
formatter
->
node
->
unit
(* Pretty-printing *)
(* Pretty-printing *)
module
Print
:
sig
module
Print
:
sig
...
...
types/types.ml
View file @
7b0dc59e
...
@@ -2453,7 +2453,7 @@ struct
...
@@ -2453,7 +2453,7 @@ struct
and
decompose_rec
any
make
dnf
acc
=
and
decompose_rec
any
make
dnf
acc
=
decompose_kind
any
(
fun
bdd
->
decompose_kind
any
(
fun
bdd
->
cup
(
decompose_dnf
(
ty
any
)
(
fun
(
b
,
l
)
->
cup
(
decompose_dnf
(
ty
any
)
(
fun
(
b
,
l
)
->
make
b
(
format_rec
b
[]
l
))
(
Rec
.
get
bdd
)
[]
))
dnf
acc
make
b
(
format_rec
b
[]
(
LabelMap
.
get
l
)
))
(
Rec
.
get
bdd
)
[]
))
dnf
acc
and
decompose_type
t
=
and
decompose_type
t
=
try
try
DescrHash
.
find
memo
t
DescrHash
.
find
memo
t
...
...
typing/typed.ml
View file @
7b0dc59e
...
@@ -200,20 +200,12 @@ module Print = struct
...
@@ -200,20 +200,12 @@ module Print = struct
br
.
br_ghost
br
.
br_ghost
Var
.
Set
.
print
br
.
br_vars_poly
Var
.
Set
.
print
br
.
br_vars_poly
pp_fv
br
.
br_vars_empty
pp_fv
br
.
br_vars_empty
pp_node
br
.
br_pat
Patterns
.
pp_node
br
.
br_pat
Types
.
Print
.
print
br
.
br_body
.
exp_typ
Types
.
Print
.
print
br
.
br_body
.
exp_typ
pp_typed
br
.
br_body
pp_typed
br
.
br_body
in
in
print_lst
f
ppf
brs
print_lst
f
ppf
brs
and
pp_node
ppf
node
=
Format
.
fprintf
ppf
"id:%d; descr:[%a]; accept:[id:%d; descr:%a]; fv:[%a]"
node
.
Patterns
.
id
Patterns
.
print
node
.
Patterns
.
descr
(
Types
.
id
node
.
Patterns
.
accept
)
Types
.
Print
.
print
(
Types
.
descr
node
.
Patterns
.
accept
)
pp_fv
node
.
Patterns
.
fv
and
pp_v
ppf
(
id
,
name
)
=
and
pp_v
ppf
(
id
,
name
)
=
Format
.
fprintf
ppf
"(%d,%s)"
(
Upool
.
int
id
)
(
Encodings
.
Utf8
.
to_string
name
)
Format
.
fprintf
ppf
"(%d,%s)"
(
Upool
.
int
id
)
(
Encodings
.
Utf8
.
to_string
name
)
...
...
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