diff options
Diffstat (limited to 'compiler')
-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"); ] |