Basic indentation level is 2. Set expandtab option in your editor, so we
have no \t
in source files.
It is often to list all cases in patter matching, like:
match t with NamedType r -> NamedType {r with nt_module = m} | Int | Void | Bool | Float | String | TyVar _ | AbstractType | Tuple _ | Func _ | Struct _ | OptStruct _ | Union _ -> t
while one could have used:
match t with NamedType r -> NamedType {r with nt_module = m} | _ -> t
which would be shorter, and probably more readable. However, after we have added new type, we should check each place, where we use pattern matching on type to see if it needs special case. OCaml will warn you if you add new type in the first case (it is unmatched), in the second - it won't.