diff options
author | Jonathan Protzenko | 2023-02-07 13:59:06 -0800 |
---|---|---|
committer | Son HO | 2023-06-04 21:44:33 +0200 |
commit | 6eee12d5f2c87237fb1276538aa9d1e8ef4addc8 (patch) | |
tree | f297a75d1e79e5da3e88f42863ddc6de911a2b7c /compiler | |
parent | 6cc10dc67f74cb0abb3062b02c8a94bf34cc938d (diff) |
Idiomatic naming conventions
Diffstat (limited to '')
-rw-r--r-- | compiler/Extract.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/Extract.ml b/compiler/Extract.ml index df7f37e1..a2ad37f5 100644 --- a/compiler/Extract.ml +++ b/compiler/Extract.ml @@ -136,12 +136,17 @@ let keywords () = List.concat [ named_unops; named_binops; misc ] let assumed_adts () : (assumed_ty * string) list = - [ + List.map (fun (t, s) -> + if !backend = Lean then + t, Printf.sprintf "%c%s" (Char.uppercase_ascii s.[0]) (String.sub s 1 (String.length s - 1)) + else + t, s + ) [ (State, "state"); (Result, "result"); (Error, "error"); (Fuel, "nat"); - (Option, if !backend = Lean then "Option" else "option"); + (Option, "option"); (Vec, "vec"); ] |