Alpha: Simplify a few things after removing dead code.
This commit is contained in:
parent
233273dff8
commit
e9c42123cb
@ -163,18 +163,18 @@ module Contract = struct
|
||||
module Code =
|
||||
Indexed_context.Make_carbonated_map
|
||||
(struct let name = ["code"] end)
|
||||
(Make_carbonated_value(struct
|
||||
(struct
|
||||
type t = Script_repr.lazy_expr
|
||||
let encoding = Script_repr.lazy_expr_encoding
|
||||
end))
|
||||
end)
|
||||
|
||||
module Storage =
|
||||
Indexed_context.Make_carbonated_map
|
||||
(struct let name = ["storage"] end)
|
||||
(Make_carbonated_value(struct
|
||||
(struct
|
||||
type t = Script_repr.lazy_expr
|
||||
let encoding = Script_repr.lazy_expr_encoding
|
||||
end))
|
||||
end)
|
||||
|
||||
type bigmap_key = Raw_context.t * Contract_repr.t
|
||||
|
||||
@ -184,10 +184,10 @@ module Contract = struct
|
||||
(Indexed_context.Raw_context)
|
||||
(struct let name = ["big_map"] end))
|
||||
(String_index)
|
||||
(Make_carbonated_value (struct
|
||||
(struct
|
||||
type t = Script_repr.expr
|
||||
let encoding = Script_repr.expr_encoding
|
||||
end))
|
||||
end)
|
||||
|
||||
module Paid_storage_space_fees =
|
||||
Indexed_context.Make_map
|
||||
|
@ -20,15 +20,6 @@ module Make_encoder (V : VALUE) = struct
|
||||
| None -> MBytes.create 0
|
||||
end
|
||||
|
||||
module Make_carbonated_value (V : VALUE) = struct
|
||||
include V
|
||||
let size =
|
||||
match Data_encoding.classify V.encoding with
|
||||
| `Fixed _size ->
|
||||
assert false
|
||||
| `Variable | `Dynamic -> Variable
|
||||
end
|
||||
|
||||
let len_name = "len"
|
||||
let data_name = "data"
|
||||
|
||||
@ -313,7 +304,7 @@ module Make_indexed_data_storage
|
||||
end
|
||||
|
||||
module Make_indexed_carbonated_data_storage
|
||||
(C : Raw_context.T) (I : INDEX) (V : CARBONATED_VALUE)
|
||||
(C : Raw_context.T) (I : INDEX) (V : VALUE)
|
||||
: Non_iterable_indexed_carbonated_data_storage with type t = C.t
|
||||
and type key = I.t
|
||||
and type value = V.t = struct
|
||||
@ -742,7 +733,7 @@ module Make_indexed_subcontext (C : Raw_context.T) (I : INDEX)
|
||||
|
||||
end
|
||||
|
||||
module Make_carbonated_map (N : NAME) (V : CARBONATED_VALUE) = struct
|
||||
module Make_carbonated_map (N : NAME) (V : VALUE) = struct
|
||||
type t = C.t
|
||||
type context = t
|
||||
type key = I.t
|
||||
|
@ -19,8 +19,6 @@ module Make_single_data_storage
|
||||
: Single_data_storage with type t = C.t
|
||||
and type value = V.t
|
||||
|
||||
module Make_carbonated_value (V : VALUE) : CARBONATED_VALUE with type t = V.t
|
||||
|
||||
module type INDEX = sig
|
||||
type t
|
||||
val path_length: int
|
||||
@ -42,7 +40,7 @@ module Make_indexed_data_storage
|
||||
and type value = V.t
|
||||
|
||||
module Make_indexed_carbonated_data_storage
|
||||
(C : Raw_context.T) (I : INDEX) (V : CARBONATED_VALUE)
|
||||
(C : Raw_context.T) (I : INDEX) (V : VALUE)
|
||||
: Non_iterable_indexed_carbonated_data_storage with type t = C.t
|
||||
and type key = I.t
|
||||
and type value = V.t
|
||||
|
@ -338,15 +338,6 @@ module type VALUE = sig
|
||||
val encoding: t Data_encoding.t
|
||||
end
|
||||
|
||||
type value_size =
|
||||
| Fixed of int
|
||||
| Variable
|
||||
|
||||
module type CARBONATED_VALUE = sig
|
||||
include VALUE
|
||||
val size: value_size
|
||||
end
|
||||
|
||||
module type Indexed_raw_context = sig
|
||||
|
||||
type t
|
||||
@ -371,7 +362,7 @@ module type Indexed_raw_context = sig
|
||||
and type key = key
|
||||
and type value = V.t
|
||||
|
||||
module Make_carbonated_map (N : NAME) (V : CARBONATED_VALUE)
|
||||
module Make_carbonated_map (N : NAME) (V : VALUE)
|
||||
: Non_iterable_indexed_carbonated_data_storage with type t = t
|
||||
and type key = key
|
||||
and type value = V.t
|
||||
|
Loading…
Reference in New Issue
Block a user