method extraction_db = extraction_db
method set_extraction_db v = {< extraction_db = v >}
method set_extraction_status
- : 'status. #g_status as 'status -> 'self
+ : 'status. (#g_status as 'status) -> 'self
= fun o -> {< extraction_db = o#extraction_db >}
end
(fun p1 n ->
HExtlib.map_option (fun (_,k) ->
(*CSC: BUG here, clashes*)
- String.uncapitalize (fst n),k) p1)
+ String.uncapitalize_ascii (fst n),k) p1)
ctx0 ctx
in
let bo = typ_of status ~metasenv ctx bo in
fun x -> g (f x)
;;
-let curry f x y =
+(*let curry f x y =
f (x, y)
-;;
+;;*)
let uncurry f (x, y) =
f x y
;;
-let rec char_list_of_string s =
+let char_list_of_string s =
let l = String.length s in
let rec aux buffer s =
function
| [] -> s
| x::xs ->
if x < String.length s then
- let c = Char.uppercase (String.get s x) in
- let _ = String.set s x c in
+ let c = Char.uppercase_ascii (String.get s x) in
+ let b = Bytes.of_string s in
+ let _ = Bytes.set b x c in
+ let s = Bytes.to_string b in
capitalize_marked_positions s xs
else
capitalize_marked_positions s xs
let idiomatic_haskell_type_name_of_string =
contract_underscores_and_capitalise |>
- String.capitalize
+ String.capitalize_ascii
;;
let idiomatic_haskell_term_name_of_string =
contract_underscores_and_capitalise |>
- String.uncapitalize
+ String.uncapitalize_ascii
;;
let classify_reference status ref =
| Algebraic il ->
String.concat "\n"
(List.map
- (fun _,ref,left,right,cl ->
+ (fun (_,ref,left,right,cl) ->
"data " ^ pp_ref status ref ^ " " ^
pretty_print_context (right@left) ^ " where\n " ^
String.concat "\n " (List.map
- (fun ref,tys ->
+ (fun (ref,tys) ->
let namectx = namectx_of_ctx left in
pp_ref status ref ^ " :: " ^
pretty_print_type status namectx tys
) il)
(* inductive and records missing *)
-let rec infos_of (info,_,obj_kind) =
+let infos_of (info,_,obj_kind) =
info @
match obj_kind with
LetRec l -> List.concat (List.map (fun (infos,_,_) -> infos) l)