Add checks for polymorphic/higher order oracles and higher order entrypoints (AEVM)

This commit is contained in:
Ulf Norell
2019-08-30 11:13:13 +02:00
parent 1ce95b32ac
commit 6fd39d4cb1
4 changed files with 50 additions and 31 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ contract ComplexTypes =
entrypoint remote_pair(n : int, s : string) : int * string =
state.worker.pair(gas = 10000, n, s)
entrypoint map(f, xs) =
function map(f, xs) =
switch(xs)
[] => []
x :: xs => f(x) :: map(f, xs)
+3 -2
View File
@@ -91,10 +91,11 @@ contract Identity =
// }
// let id(x) = x
// let main(xs) = map(double,xs)
entrypoint z(f,x) = x
function z(f,x) = x
function s(n) = (f,x)=>f(n(f,x))
function add(m,n) = (f,x)=>m(f,n(f,x))
entrypoint main(_) =
entrypoint main() =
let three=s(s(s(z)))
add(three,three)
(((i)=>i+1),0)
+1 -1
View File
@@ -1,6 +1,6 @@
contract TuplesMatch =
entrypoint tuplify3() = (t) => switch(t)
function tuplify3() = (t) => switch(t)
(x, y, z) => 3
entrypoint fst(p : int * string) =