allow key_hash literals
This commit is contained in:
parent
012ee0740b
commit
6841609362
@ -17,6 +17,7 @@ let peephole_expression : expression -> expression result = fun e ->
|
|||||||
match e.expression with
|
match e.expression with
|
||||||
| E_ascription (e' , t) as e -> (
|
| E_ascription (e' , t) as e -> (
|
||||||
match (e'.expression , t.type_expression') with
|
match (e'.expression , t.type_expression') with
|
||||||
|
| (E_literal (Literal_string s) , T_constant (TC_key_hash)) -> return @@ E_literal (Literal_key_hash s)
|
||||||
| (E_literal (Literal_int i) , T_constant (TC_timestamp)) -> return @@ E_literal (Literal_timestamp i)
|
| (E_literal (Literal_int i) , T_constant (TC_timestamp)) -> return @@ E_literal (Literal_timestamp i)
|
||||||
| (E_literal (Literal_string str) , T_constant (TC_timestamp)) ->
|
| (E_literal (Literal_string str) , T_constant (TC_timestamp)) ->
|
||||||
let%bind time =
|
let%bind time =
|
||||||
|
Loading…
Reference in New Issue
Block a user