-
remove
caml_exn_Division_by_zero
when it cannot happen, likea / (a * a)
-
perhaps generalize it to knowing that a number is positive not operating on it
-
do simple math inside of big functions
-
try to optimize x |> map() |> map()
-
search
module String
on https://ocaml.janestreet.com/ocaml-core/latest/doc/base/Base/ -
check to see if it inlines
| x when is(x)
andis
is another pattern matching -
typechecker should try to ensure value when dealing with records, there is no need to open a module for that
-
remove inner closures without any reference
-
let.some (_, _, name, received_value_type, index) =List.nth_opt(variable_table, table_index);
no warning even if not used on index -
abstract types leads to this being generic https://github.com/ocaml/ocaml/blob/trunk/lambda/translprim.ml#L538
-
deep types inference,
Operation.Side_chain.
could be omitted in the following code
apply_side_chain(
state,
Signed.sign(
~key,
Operation.Side_chain.{
nonce: 0l,
block_height: 0L,
source,
amount: Amount.of_int(5),
kind: Freeze,
},
),
)
- if `x |> List.exists(f)` fails to typecheck try `List.exists(x, f)` with the reversed signature, this especially true with records inference in `f`
- warnings ocaml both branches are equal `x ? [] : []`