Skip to content
Snippets Groups Projects

Reworking parametric types in CameLIGO and JsLIGO (concrete syntax, CST, pretty-printing)

Merged Christian Rinderknecht requested to merge rinderknecht@parametric_types into dev
2 files
+ 10
9
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -108,7 +108,8 @@ let test_cases =
[ pos ~line:0 ~character:8, one "type 'a endo = Endo of ('a -> 'a)"
; pos ~line:4 ~character:61, one "type 'a endo = Endo of ('a -> 'a)"
; ( pos ~line:4 ~character:20
, one "compose_endo_with_type_annotation :\n a.a endo -> a endo -> a endo" )
, one "compose_endo_with_type_annotation :\n 'a.'a endo -> 'a endo -> 'a endo"
)
; pos ~line:5 ~character:12, one "f : a -> a"
; pos ~line:5 ~character:37, one "x : a"
; pos ~line:5 ~character:47, one "x : a"
@@ -118,19 +119,19 @@ let test_cases =
; pos ~line:40 ~character:18, one "f : int -> int"
; pos ~line:56 ~character:12, one "x : t"
; pos ~line:58 ~character:28, one "f : a -> a"
; pos ~line:59 ~character:15, one "map : a b.(a -> b) -> a list -> b list"
; pos ~line:59 ~character:15, one "map : 'a 'b.('a -> 'b) -> 'a list -> 'b list"
; pos ~line:65 ~character:41, one "type 'a list2 = 'a list list"
; pos ~line:70 ~character:5, one "x1 : int list list -> int list list list"
; pos ~line:72 ~character:23, one "endo_list2 : a.a endo -> a list2 endo"
; pos ~line:72 ~character:23, one "endo_list2 : 'a.'a endo -> 'a list2 endo"
; ( pos ~line:75 ~character:4
, one "z : key_hash option -> tez -> int -> (operation * address)" )
; pos ~line:75 ~character:35, one "x : int"
; ( pos ~line:75 ~character:27
, one
"create_contract :\n\
\ p\n\
\ s.(p -> s -> (operation list * s)) ->\n\
\ key_hash option -> tez -> s -> (operation * address)" )
\ 'p\n\
\ 's.('p -> 's -> (operation list * 's)) ->\n\
\ key_hash option -> tez -> 's -> (operation * address)" )
; ( pos ~line:77 ~character:28
, one "type 'v proxy_address =\n ('v * nat * address, unit) typed_address" )
; pos ~line:79 ~character:8, one "type 'v p = 'v proxy_address"
@@ -196,8 +197,8 @@ let test_cases =
, one
"module Bytes : sig\n\
\ val concats : bytes list -> bytes\n\n\
\ val pack : a.a -> bytes\n\n\
\ val unpack : a.bytes -> a option\n\n\
\ val pack : 'a.'a -> bytes\n\n\
\ val unpack : 'a.bytes -> 'a option\n\n\
\ val length : bytes -> nat\n\n\
\ val concat : bytes -> bytes -> bytes\n\n\
\ val sub : nat -> nat -> bytes -> bytes\n\n\
Loading