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
a348bcd9
Commit
a348bcd9
authored
Jun 20, 2014
by
Pietro Abate
Browse files
minor fix to lambda tests
parent
ef5b1e56
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/lambda/src/valueTests.ml
View file @
a348bcd9
...
...
@@ -14,29 +14,26 @@ let run_test_compile msg expected totest _ =
;;
let
tests_poly_abstr
=
[
"Test CDuce.lambda.const_abstr failed"
,
"fun f (_ : Int) : Int = 2"
,
"let x : Int = 3 in x : Int"
;
"Test CDuce.lambda.let"
,
"
let x : Int = 3 in x : Int
"
,
"
3
"
,
"let x : Int = 3 in x : Int"
;
"Test CDuce.lambda.appl_identity_int"
,
"
let x : Int = 3 in x : Int
"
,
"(fun (x :
`$
A) :
`$
A = x) 2"
;
"
2
"
,
"(fun (x :
'
A) :
'
A = x) 2"
;
"Test CDuce.lambda.appl_identity_tag"
,
"
let x : Int = 3 in x : Int
"
,
"(fun (x :
`$
A) :
`$
A = x) `a"
;
"
Atom(a)
"
,
"(fun (x :
'
A) :
'
A = x) `a"
;
"Test CDuce.lambda.partial"
,
"
let x : Int = 3 in x : Int
"
,
"fun (
`$
A -> (Int -> Int)) | _ -> (fun (
`$
B ->
`$
B) y -> y)"
;
"
Abstraction([(`$A,Int -> Int)],Id)
"
,
"fun (
'
A -> (Int -> Int)) | _ -> (fun (
'
B ->
'
B) y -> y)"
;
"Test CDuce.lambda.appl_partial"
,
"
let x : Int = 3 in x : Int
"
,
"(fun (
`$
A -> (Int -> Int)) | _ -> (fun (
`$
B ->
`$
B) y -> y)) 3"
;
"
Abstraction([(`$B,`$B)],Id)
"
,
"(fun (
'
A -> (Int -> Int)) | _ -> (fun (
'
B ->
'
B) y -> y)) 3"
;
];;
let
tests_compile
=
"CDuce compile tests (Typed -> Lambda )"
>:::
...
...
@@ -44,12 +41,11 @@ let tests_compile = "CDuce compile tests (Typed -> Lambda )" >:::
(* Typed -> Lambda -> Value *)
let
run_test_eval
msg
expected
totest
_
=
let
expected
=
parse_texpr_vexpr
~
quite
:
true
expected
in
let
totest
=
parse_cduce_vexpr
~
quite
:
true
totest
in
assert_equal
~
msg
:
msg
~
printer
:
(
fun
x
->
x
)
(
Value
.
Print
.
string_of_value
expected
)
expected
(
Value
.
Print
.
string_of_value
totest
)
let
tests_eval
=
"CDuce evaluation tests (Typed -> Lambda -> Value )"
>:::
...
...
types/types.ml
View file @
a348bcd9
...
...
@@ -2897,7 +2897,7 @@ module Tallying = struct
type
t
=
Descr
.
s
E
.
t
let
compare
=
E
.
compare
compare
let
equal
=
E
.
equal
equal
let
hash
_
=
1
let
hash
=
Hashtbl
.
hash
let
dump
=
E
.
pp
let
check
_
=
()
end
)
...
...
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