text
stringlengths
0
601k
let encoding : t Data_encoding . t = let open Data_encoding in conv ( fun t -> ( Option . map Uri . to_string t . endpoint , Option . map Uri . to_string t . rpc_addr , t . rpc_tls , Option . map Int32 . of_int t . sym_block_caching_time ) ) ( fun ( endpoint , rpc_addr , rpc_tls , sym_block_caching_time ) -> { endpoint...
let make ~ endpoint ~ rpc_addr ~ rpc_tls ~ sym_block_caching_time : t = { endpoint ; rpc_addr ; rpc_tls ; sym_block_caching_time }
let sym_block_caching_time_error sym_block_caching_time = match sym_block_caching_time with | Some sym_block_caching_time when sym_block_caching_time <= 0 -> Some ( Format . sprintf { |-- sym - block - caching - time argument and sym_block_caching_time field must be strictly positive , but found % d } | sym_block_cachi...
type ' a destructed = Valid of ' a | Invalid of string | CannotDeserialize
let destruct_config json = match Data_encoding . Json . destruct encoding json with | cfg -> ( match sym_block_caching_time_error cfg . sym_block_caching_time with | Some err -> Invalid err | None -> Valid cfg ) | exception _ -> CannotDeserialize
let union_right_bias ( t1 : t ) ( t2 : t ) = { endpoint = Option . either t2 . endpoint t1 . endpoint ; rpc_addr = Option . either t2 . rpc_addr t1 . rpc_addr ; rpc_tls = Option . either t2 . rpc_tls t1 . rpc_tls ; sym_block_caching_time = Option . either t2 . sym_block_caching_time t1 . sym_block_caching_time ; }
type runtime = { endpoint : Uri . t ; rpc_server_address : P2p_addr . t ; rpc_server_port : int ; rpc_server_tls : ( string * string ) option ; sym_block_caching_time : int option ; }
let address_and_port_for_runtime rpc_addr = let open Result in let wrong_rpc_addr looked_for = error @@ Format . asprintf { | Wrong " -- rpc - addr " argument or " rpc_addr " field : % a . % s cannot be determined } | Uri . pp rpc_addr looked_for in match ( Uri . host rpc_addr , Uri . port rpc_addr ) with | ( None , _ ...
let tls_for_runtime = let open Result in let regexp_str = " ( . ) , ( . ) " ** in let regexp = Re . compile ( Re . Perl . re regexp_str ) in fun rpc_tls -> match Re . exec_opt regexp rpc_tls with | None -> error @@ Format . asprintf { | Value of " -- rpc - tls " argument or " rpc_tls " field cannot be parsed : % s does...
let opt_res_to_res_opt = function | None -> Ok None | Some ( Ok x ) -> Ok ( Some x ) | Some ( Error x ) -> Error x
let to_runtime ( { endpoint ; rpc_addr ; rpc_tls ; sym_block_caching_time } : t ) : ( runtime , string ) result = match ( endpoint , rpc_addr , sym_block_caching_time_error sym_block_caching_time ) with | ( None , _ , _ ) -> Error { | Endpoint not specified : pass argument -- endpoint or specify " endpoint " field in C...
type error += Proxy_server_RPC_Port_already_in_use of P2p_point . Id . t list
type args = { address : P2p_addr . t ; port : int ; tls_cert_and_key : ( string * string ) option ; }
let ( ) = register_error_kind ` Permanent ~ id " : main . run . port_already_in_use " ~ title " : Cannot start proxy server : RPC port already in use " ~ description " : Another process is running on the same RPC port . " ~ pp ( : fun ppf addrlist -> Format . fprintf ppf " Another process is probably running on one of ...
let launch_rpc_server dir { address ; port ; tls_cert_and_key } = let open Lwt_tzresult_syntax in let host = Ipaddr . V6 . to_string address in let mode = match tls_cert_and_key with | None -> ` TCP ( ` Port port ) | Some ( cert , key ) -> ` TLS ( ` Crt_file_path cert , ` Key_file_path key , ` No_password , ` Port port...
let run dir ( { address ; port ; _ } as args ) = let open Lwt_result_syntax in let log_cfg = Lwt_log_sink_unix . create_cfg ( ) in let *! ( ) = Tezos_base_unix . Internal_event_unix . init ~ lwt_log_sink : log_cfg ( ) in let node_downer = Lwt_exit . register_clean_up_callback ~ loc : __LOC__ ( fun _ -> Events . ( emit ...
let starting_rpc_server = declare_2 ~ section ~ name " : starting_proxy_rpc_server " ~ msg " : starting proxy RPC server on { host } { : port } " ~ level : Notice ( " host " , Data_encoding . string ) ( " port " , Data_encoding . uint16 )
let shutting_down_proxy_server = declare_0 ~ section ~ name " : shutting_down_proxy_server " ~ msg " : shutting down the proxy server " ~ level : Notice ( )
let shutting_down_rpc_server = declare_0 ~ section ~ name " : shutting_down_rpc_server " ~ msg " : shutting down the proxy RPC server " ~ level : Notice ( )
let init ? nodes_args ? parameter_file ~ protocol ( ) = let * ( node , client ) = Client . init_with_protocol ? nodes_args ? parameter_file ` Client ~ protocol ( ) in let * ( ) = Client . bake_for client in let * proxy_server = Proxy_server . init node in Client . set_mode ( Client ( Some ( Proxy_server proxy_server ) ...
let heuristic_event_handler ( ) : Proxy_server . event -> unit = let seens = ref String_set . empty in let event_to_path json = let fail = Test . fail " Unexpected JSON within % s ( % d ) " ( JSON . encode json ) in match JSON . unannotate json with | ` A sub -> List . map ( function ` String segment -> segment | _ -> ...
let big_map_get ( ? big_map_size = 10 ) ? nb_gets ~ protocol mode ( ) = Log . info " Test advanced originated contract " ; let * parameter_file = Protocol . write_parameter_file ~ base ( : Either . right ( protocol , None ) ) [ ( [ " hard_storage_limit_per_operation " ] , Some " " \ 99999999 " " ) ] \ in let * ( node ,...
let test_equivalence = let open Proxy . Location in let alt_mode = Vanilla_proxy_server in Protocol . register_test ~ __FILE__ ~ title " ( : Vanilla , proxy_server endpoint ) Compare RPC get " ~ tags ( : compare_tags alt_mode ) @@ fun protocol -> let * ( node , _ , alternative ) = init ~ protocol ( ) in let vanilla = C...
let register ~ protocols = let register mode = let mode_tag = match mode with ` Node -> " node " | ` Proxy_server -> " proxy_server " in Protocol . register_test ~ __FILE__ ~ title ( : sf " big_map_perf ( % s ) " mode_tag ) ~ tags [ " : bigmapperf " ; mode_tag ] ( fun protocol -> big_map_get ~ protocol mode ( ) ) ~ pro...
let key_to_expr = [ ( " " \ 0000 " " , \ " exprv5Xae7JmNFo1i4nn2jegk4Xd9YKYDFx5N4ijcxPTMcpTs4Xz32 " ) ; ( " " \ 0001 " " , \ " exprta3XMhBDXf2VneSXs176uruAM33kJdkmCWEirrfr7QzPjs9Nuy " ) ; ( " " \ 0002 " " , \ " exprtus6kuXFQTKX8uBSKfF6Nu1Dxm3QsoUayEA1gUPPYfhrto3PMp " ) ; ( " " \ 0003 " " , \ " exprtcRTJShY4B5TwVnWdUSQn...
let key_to_expr = List . to_seq key_to_expr |> String_map . of_seq
module Directory = Resto_directory . Make ( RPC_encoding )
module Events = struct include Internal_event . Simple let section = [ " proxy_services " ] let clearing_data = declare_2 ~ section ~ name " : clearing_data " ~ msg " : clearing data for chain { chain } and block { block } " ~ level : Info ( " chain " , Data_encoding . string ) ( " block " , Data_encoding . string ) en...
module type BLOCK_TO_HASH = sig val hash_of_block : # RPC_context . simple -> Tezos_shell_services . Shell_services . chain -> Tezos_shell_services . Block_services . block -> Block_hash . t option tzresult Lwt . t val add : Tezos_shell_services . Shell_services . chain -> Tezos_shell_services . Block_services . block ...
let raw_hash_of_block ( block : Tezos_shell_services . Block_services . block ) : Block_hash . t option = match block with | ` Hash ( h , 0 ) -> Some h | ` Alias ( _ , _ ) | ` Genesis | ` Head _ | ` Level _ | ` Hash ( _ , _ ) -> None
module BlockToHashClient ( S : Registration . Proxy_sig ) : BLOCK_TO_HASH = struct let table = Hashtbl . create 17 let add chain block hash = Hashtbl . add table ( chain , block ) hash let hash_of_block ( rpc_context : # RPC_context . simple ) ( chain : Tezos_shell_services . Shell_services . chain ) ( block : Tezos_sh...
type mode = | Light_client of Light . sources | Proxy_client | Proxy_server of int option
let to_client_server_mode = function | Light_client _ | Proxy_client -> Proxy . Client | Proxy_server _ -> Proxy . Server
module BlockToHashServer : BLOCK_TO_HASH = struct let hash_of_block __ _ = function | ` Hash ( h , 0 ) -> return_some h | ` Alias ( _ , _ ) | ` Genesis | ` Head _ | ` Level _ | ` Hash ( _ , _ ) -> return_none let add _ _ _ = ( ) end
type env_cache_key = Tezos_shell_services . Chain_services . chain * Tezos_shell_services . Block_services . block
module Env_cache_key_hashed_type : Hashtbl . HashedType with type t = env_cache_key = struct type t = env_cache_key let equal ( ( lchain , lblock ) : t ) ( ( rchain , rblock ) : t ) = lchain = rchain && lblock = rblock let hash = Hashtbl . hash end
module Env_cache = ( val Ringo . ( map_maker ~ replacement : LRU ~ overflow : Strong ~ accounting : Sloppy ) ) ( Env_cache_key_hashed_type )
module Env_cache_lwt = Ringo_lwt . Functors . Make_result ( Env_cache )
let schedule_clearing ( printer : Tezos_client_base . Client_context . printer ) ( rpc_context : RPC_context . generic ) ( proxy_env : Registration . proxy_environment ) ( mode : mode ) envs_cache key chain block = let open Lwt_syntax in match ( mode , raw_hash_of_block block ) with | ( Light_client _ , _ ) | ( Proxy_c...
let protocols protocol_hash = let open Tezos_shell_services in let path = let open Tezos_rpc . RPC_path in prefix Block_services . chain_path Block_services . path in let service = Tezos_rpc . RPC_service . prefix path Block_services . Empty . S . protocols in Directory . register Directory . empty service ( fun _prefi...
let build_directory ( printer : Tezos_client_base . Client_context . printer ) ( rpc_context : RPC_context . generic ) ( mode : mode ) ( proxy_env : Registration . proxy_environment ) : unit RPC_directory . t = let ( module Proxy_environment ) = proxy_env in let b2h : ( module BLOCK_TO_HASH ) = match mode with | Proxy_...
type pr_context = Pprintf . pr_context = { ind : int ; bef : string ; aft : string ; dang : string } ; ;
type ' a pr_fun = pr_context -> ' a -> string ; ;
let tab ind = String . make ind ' ' ; ;
let rec hlist elem pc xl = match xl with [ ] -> sprintf " % s % s " pc . bef pc . aft | [ x ] -> elem pc x | x :: xl -> sprintf " % s % s " ( elem { pc with aft = " " ; dang = " " } x ) ( hlist elem { pc with bef = " " } xl ) ; ;
let rec hlist2 elem elem2 pc xl = match xl with [ ] -> invalid_arg " hlist2 " | [ x ] -> elem pc x | x :: xl -> sprintf " % s % s " ( elem { pc with aft = " " } x ) ( hlist2 elem2 elem2 { pc with bef = " " } xl ) ; ;
let rec hlistl elem eleml pc xl = match xl with [ ] -> sprintf " % s % s " pc . bef pc . aft | [ x ] -> eleml pc x | x :: xl -> sprintf " % s % s " ( elem { pc with aft = " " ; dang = " " } x ) ( hlistl elem eleml { pc with bef = " " } xl ) ; ;
let rec vlist elem pc xl = match xl with [ ] -> sprintf " % s % s " pc . bef pc . aft | [ x ] -> elem pc x | x :: xl -> sprintf " % s \ n % s " ( elem { pc with aft = " " ; dang = " " } x ) ( vlist elem { pc with bef = tab pc . ind } xl ) ; ;
let rec vlist2 elem elem2 pc xl = match xl with [ ] -> invalid_arg " vlist2 " | [ x ] -> elem pc x | x :: xl -> sprintf " % s \ n % s " ( elem { pc with aft = " " } x ) ( vlist2 elem2 elem2 { pc with bef = tab pc . ind } xl ) ; ;
let rec vlist3 elem elem2 pc xl = match xl with [ ] -> invalid_arg " vlist3 " | [ x ] -> elem pc ( x , true ) | x :: xl -> sprintf " % s \ n % s " ( elem { pc with aft = " " } ( x , false ) ) ( vlist3 elem2 elem2 { pc with bef = tab pc . ind } xl ) ; ;
let rec vlistl elem eleml pc xl = match xl with [ ] -> sprintf " % s % s " pc . bef pc . aft | [ x ] -> eleml pc x | x :: xl -> sprintf " % s \ n % s " ( elem { pc with aft = " " ; dang = " " } x ) ( vlistl elem eleml { pc with bef = tab pc . ind } xl ) ; ;
let rec vlistf pc fl = match fl with [ ] -> sprintf " % s % s " pc . bef pc . aft | [ f ] -> f pc | f :: fl -> sprintf " % s \ n % s " ( f { pc with aft = " " ; dang = " " } ) ( vlistf { pc with bef = tab pc . ind } fl ) ; ;
let hvlistl elem eleml pc xl = if Pretty . horizontally ( ) then hlistl elem eleml pc xl else vlistl elem eleml pc xl ; ;
let rise_string ind sh b s = if String . length s > ind + sh && s . [ ind + sh ] = ' " ' then match try Some ( String . index s ' \ n ' ) with Not_found -> None with Some i -> let t = String . sub s ( ind + sh ) ( String . length s - ind - sh ) in let i = i - ind - sh in begin match horiz_vertic ( fun ( ) -> Some ( spr...
let rec plistl elem eleml sh pc xl = if xl = [ ] then sprintf " % s % s " pc . bef pc . aft else let ( s1 , s2o ) = plistl_two_parts elem eleml sh pc xl in match s2o with Some s2 -> sprintf " % s \ n % s " s1 s2 | None -> s1 match xl with [ ] -> assert false | [ x , _ ] -> eleml pc x , None | ( x , sep ) :: xl -> let s...
let plist elem sh pc xl = plistl elem elem sh pc xl ; ;
let plistb elem sh pc xl = match xl with [ ] -> sprintf " % s % s " pc . bef pc . aft | [ x , _ ] -> horiz_vertic ( fun ( ) -> elem { pc with bef = sprintf " % s " pc . bef } x ) ( fun ( ) -> let s = elem { pc with ind = pc . ind + sh ; bef = tab ( pc . ind + sh ) } x in sprintf " % s \ n % s " pc . bef s ) | ( x , sep...
let rec plistf sh pc xl = if xl = [ ] then sprintf " % s % s " pc . bef pc . aft else let ( s1 , s2o ) = plistf_two_parts sh pc xl in match s2o with Some s2 -> sprintf " % s \ n % s " s1 s2 | None -> s1 match xl with [ ] -> assert false | [ x , _ ] -> x pc , None | ( x , sep ) :: xl -> let s = horiz_vertic ( fun ( ) ->...
let rec plistbf sh pc xl = match xl with [ ] -> sprintf " % s % s " pc . bef pc . aft | [ x , _ ] -> horiz_vertic ( fun ( ) -> x { pc with bef = sprintf " % s " pc . bef } ) ( fun ( ) -> let s = x { pc with ind = pc . ind + sh ; bef = tab ( pc . ind + sh ) } in sprintf " % s \ n % s " pc . bef s ) | ( x , sep ) :: xl -...
module Buff = struct let buff = ref ( string_create 80 ) ; ; let store len x = if len >= string_length ! buff then buff := string_cat ! buff ( string_create ( string_length ! buff ) ) ; string_set ! buff len x ; succ len ; ; let mstore len s = let rec add_rec len i = if i == String . length s then len else add_rec ( st...
let comment_info s = let rec loop i nl_bef ind_bef = if i >= String . length s then " " , 0 , 0 else if s . [ i ] = ' \ n ' then loop ( i + 1 ) ( nl_bef + 1 ) 0 else if s . [ i ] = ' ' then loop ( i + 1 ) nl_bef ( ind_bef + 1 ) else let s = String . sub s i ( String . length s - i ) in s , nl_bef , ind_bef in loop 0 0 ...
let adjust_comment_indentation ind s nl_bef ind_bef = if s = " " then " " else let ( ind_aft , i_bef_ind ) = let rec loop ind_aft i = if i >= 0 && s . [ i ] = ' ' then loop ( ind_aft + 1 ) ( i - 1 ) else ind_aft , i in loop 0 ( String . length s - 1 ) in let ind_bef = if nl_bef > 0 then ind_bef else ind in let len = i_...
let eight_chars = String . make 8 ' ' ; ;
let expand_tabs s = let rec loop len i = if i = String . length s then Buff . get len else if s . [ i ] = ' \ t ' then loop ( Buff . mstore len eight_chars ) ( i + 1 ) else loop ( Buff . store len s . [ i ] ) ( i + 1 ) in bytes_to_string ( loop 0 0 ) ; ;
let comm_bef ind loc = let s = expand_tabs ( Ploc . comment loc ) in let ( s , nl_bef , ind_bef ) = comment_info s in adjust_comment_indentation ind s nl_bef ind_bef ; ;
let no_constructors_arity = ref false ; ;
let expand_module_prefix m = let rec loop rev_lel = function ( p , e ) :: rest -> let p = match p with MLast . PaPfx ( _ , MLast . LiUid ( _ , _ ) , _ ) -> p | _ -> let loc = MLast . loc_of_patt p in MLast . PaPfx ( loc , MLast . LiUid ( loc , m ) , p ) in loop ( ( p , e ) :: rev_lel ) rest | [ ] -> List . rev rev_lel ...
let do_split_or_patterns_with_bindings pel = let rec loop rev_pel = function ( p , wo , e ) :: pel -> let ( rev_pel , pel ) = let ( p , as_opt ) = match p with MLast . PaAli ( loc , p1 , p2 ) -> p1 , ( fun p -> MLast . PaAli ( loc , p , p2 ) ) | _ -> p , ( fun p -> p ) in match p with MLast . PaOrp ( loc , p1 , p2 ) ->...
Format . eprintf " pr_depend : not impl : % s ; % a . " @ name ObjTools . print ( Obj . repr x ) ;
module StrSet = Set . Make ( struct type t = string ; value compare = compare ; end ) ; fun [ Some x -> f x | None -> ( ) ] ; fun [ [ s ; _ :: _ ] -> addmodule s | _ -> ( ) ] ; fun [ TyAcc _ t _ -> ctyp_module t | TyAli _ t1 t2 -> do { ctyp t1 ; ctyp t2 ; } | TyApp _ t1 t2 -> do { ctyp t1 ; ctyp t2 ; } | TyAny _ -> ( )...
match el with [ [ ] -> k | [ x ] -> [ : ` elem x k ] : | [ x :: l ] -> [ : ` elem x [ : ] ; : list elem l k ] : ] ; match el with [ [ ] -> k | [ x ] -> [ : ` elem x k ] : | [ x :: l ] -> [ : ` elem x [ : ` sep ] ; : listws elem sep l k ] : ] ; match el with [ [ ] -> [ : b ; k ] : | [ x ] -> [ : ` elem b x dg k ] : | [ ...
type symbol = [ Snterm of MLast . expr | Snterml of MLast . expr and string | Slist0 of symbol | Slist0sep of symbol and symbol | Slist1 of symbol | Slist1sep of symbol and symbol | Sopt of symbol | Sself | Snext | Stoken of Token . pattern | Srules of list ( list ( option MLast . patt * symbol ) * option MLast . expr ...
let lev = try find_pr_level " expr1 " pr_expr . pr_levels with [ Failure _ -> find_pr_level " top " pr_expr . pr_levels ] in extfun lev . pr_rules with [ <: expr < let $ list : _ $ in $ _ $ >> as e when is_gextend e -> fun _ next _ k -> [ : ` next e " " k ] : ] ;
let lev = find_pr_level " apply " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Grammar . extend $ _ $ >> as e -> fun _ next _ k -> [ : ` next e " " k ] : ] ;
let lev = find_pr_level " simple " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Grammar . extend $ _ $ >> as e -> fun _ _ _ k -> [ : ` extend e " " k ] : | <: expr < let $ list : _ $ in $ _ $ >> as e when is_gextend e -> fun _ _ _ k -> [ : ` gextend e " " k ] : ] ; " Don ' t reconstruct SLIST and SOPT ...
fun [ <: expr < [ ( $ _ , $ $ _ , $ fun [ $ list : pel $ ] ) :: $ el $ ] >> -> let ( p , wo , e ) = match pel with [ [ ( p , wo , <: expr < Some $ e $ ) ; >> ( <: patt < _ , >> None , <: expr < None ) ] >> -> ( p , wo , e ) | [ ( p , wo , <: expr < Some $ e $ ) ] >> -> ( p , wo , e ) | _ -> raise Not_found ] in let rpe...
let lev = find_pr_level " top " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Extfun . extend $ e $ $ list $ >> as ge -> fun _ next dg k -> try let pel = un_extfun [ ] list in [ : ` HVbox [ : ] ; : ` BEbox [ : ` S LR " extfun " ; ` expr e " " [ : ] ; : ` S LR " with " ] ; : ` match_assoc_list pel k ] : ...
let lev = find_pr_level " apply " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Extfun . extend $ _ $ $ _ $ >> as ge -> fun _ next dg k -> [ : ` next ge dg k ] : ] ;
loop [ ] where rec loop r = fun [ <: expr < [ $ rule $ :: $ rules ] $ >> -> let ( p , wo , e ) = match rule with [ <: expr < ( $ _ , $ $ _ , $ $ e ) $ >> -> match e with [ <: expr < fun [ $ p $ $ opt : wo $ -> Some $ e $ | _ -> None ] >> -> ( p , wo , e ) | <: expr < fun $ p $ -> Some $ e $ >> -> ( p , None , e ) | _ -...
Eprinter . clear pr_expr ; Eprinter . clear pr_patt ; Eprinter . clear pr_ctyp ; Eprinter . clear pr_str_item ; Eprinter . clear pr_sig_item ; Eprinter . clear pr_longident ; Eprinter . clear pr_module_expr ; Eprinter . clear pr_module_type ; Eprinter . clear pr_class_sig_item ; Eprinter . clear pr_class_str_item ; Epr...
match Pcaml . output_file . val with [ Some f -> open_out_bin f | None -> do { pervasives_set_binary_mode_out stdout True ; stdout } ] ; fun [ [ ( _ , loc ) :: _ ] -> loc | [ ] -> Ploc . dummy ] ; let loc = first_loc_of_ast ast in let fname = Ploc . file_name loc in IFDEF OCAML_VERSION < OCAML_4_05_0 THEN let _ = fname...
match p with [ <: patt < $ lid : s $ >> -> if String . length s >= 2 && s . [ 1 ] == ' ' ' then HVbox [ : ` S LR ( " " ^ s ) ; k ] : else patt p dg k | _ -> patt p dg k ] ; let rec get = fun [ <: expr < Stream . iapp $ x $ $ y $ >> -> [ ( False , x ) :: get y ] | <: expr < Stream . icons $ x $ $ y $ >> -> [ ( True , x ...
let lev = find_pr_level " expr1 " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < let ( __strm : Stream . t _ ) = $ _ $ in $ _ $ >> as e -> fun curr next dg k -> if not ( List . mem dg [ " " ; | " ; " ] ) then [ : ` pmatch e dg k ] : else [ : ` S LO " ( " ; ` pmatch e " " [ : ` S RO " ) " ; k ] : ] : | <:...
let lev = find_pr_level " apply " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . iapp $ _ $ $ _ $ >> | <: expr < Stream . icons $ _ $ $ _ $ >> | <: expr < Stream . ising $ _ $ >> | <: expr < Stream . lapp ( fun _ -> $ _ ) $ $ _ $ >> | <: expr < Stream . lcons ( fun _ -> $ _ ) $ $ _ $ >> | <: exp...
let lev = find_pr_level " dot " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . sempty >> as e -> fun curr next dg k -> [ : ` next e " " k ] : ] ;
let lev = find_pr_level " simple " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . iapp $ _ $ $ _ $ >> | <: expr < Stream . icons $ _ $ $ _ $ >> | <: expr < Stream . ising $ _ $ >> | <: expr < Stream . lapp ( fun _ -> $ _ ) $ $ _ $ >> | <: expr < Stream . lcons ( fun _ -> $ _ ) $ $ _ $ >> | <: ex...
match p with [ <: patt < $ lid : s $ >> -> if String . length s >= 2 && s . [ 1 ] == ' ' ' then HVbox [ : ` S LR ( " " ^ s ) ; k ] : else patt p dg k | _ -> patt p dg k ] ; let rec get = fun [ <: expr < Stream . iapp $ x $ $ y $ >> -> [ ( False , x ) :: get y ] | <: expr < Stream . icons $ x $ $ y $ >> -> [ ( True , x ...
let lev = find_pr_level " expr1 " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < let ( __strm : Stream . t _ ) = $ _ $ in $ _ $ >> as e -> fun _ _ dg k -> if not ( List . mem dg [ " " ; | " ; " ] ) then [ : ` pmatch e dg k ] : else [ : ` S LO " ( " ; ` pmatch e " " [ : ` S RO " ) " ; k ] : ] : | <: expr ...
let lev = find_pr_level " apply " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . iapp $ _ $ $ _ $ >> | <: expr < Stream . icons $ _ $ $ _ $ >> | <: expr < Stream . ising $ _ $ >> | <: expr < Stream . lapp ( fun _ -> $ _ ) $ $ _ $ >> | <: expr < Stream . lcons ( fun _ -> $ _ ) $ $ _ $ >> | <: exp...
let lev = find_pr_level " dot " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . sempty >> as e -> fun _ next _ k -> [ : ` next e " " k ] : ] ;
let lev = find_pr_level " simple " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . iapp $ _ $ $ _ $ >> | <: expr < Stream . icons $ _ $ $ _ $ >> | <: expr < Stream . ising $ _ $ >> | <: expr < Stream . lapp ( fun _ -> $ _ ) $ $ _ $ >> | <: expr < Stream . lcons ( fun _ -> $ _ ) $ $ _ $ >> | <: ex...
Eprinter . clear pr_expr ; Eprinter . clear pr_patt ; Eprinter . clear pr_ctyp ; Eprinter . clear pr_str_item ; Eprinter . clear pr_sig_item ; Eprinter . clear pr_longident ; Eprinter . clear pr_module_expr ; Eprinter . clear pr_module_type ; Eprinter . clear pr_class_sig_item ; Eprinter . clear pr_class_str_item ; Epr...
type seq = [ SE_let of Ploc . t and bool and list ( MLast . patt * MLast . expr * MLast . attributes ) and seq | SE_let_module of Ploc . t and option ( Ploc . vala string ) and MLast . module_expr and seq | SE_let_open of Ploc . t and bool and MLast . module_expr and seq | SE_closed of MLast . expr and seq | SE_other o...
let desc = if Obj . tag ( Obj . repr x ) = Obj . tag ( Obj . repr " " ) then " " " \ ^ Obj . magic x ^ " " " \ else if Obj . is_block ( Obj . repr x ) then " tag = " ^ string_of_int ( Obj . tag ( Obj . repr x ) ) else " int_val = " ^ string_of_int ( Obj . magic x ) in pprintf pc " " \ pr_ro , not impl : % s ; % s " " \...
let rec get = fun [ <: expr < Stream . iapp $ x $ $ y $ >> -> [ ( False , x ) :: get y ] | <: expr < Stream . icons $ x $ $ y $ >> -> [ ( True , x ) :: get y ] | <: expr < Stream . ising $ x $ >> -> [ ( True , x ) ] | <: expr < Stream . lapp ( fun _ -> $ x ) $ $ y $ >> -> [ ( False , x ) :: get y ] | <: expr < Stream ....
let lev = find_pr_level " top " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < let ( __strm : Stream . t _ ) = $ _ $ in $ _ $ >> as e -> fun curr next _ k -> [ : ` pmatch e " " k ] : | <: expr < match $ _ $ __strm with [ $ list : _ $ ] >> as e -> fun curr next _ k -> [ : ` pmatch e " " k ] : | <: expr < ...
let lev = find_pr_level " apply " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . iapp $ _ $ $ _ $ >> | <: expr < Stream . icons $ _ $ $ _ $ >> | <: expr < Stream . ising $ _ $ >> | <: expr < Stream . lapp ( fun _ -> $ _ ) $ $ _ $ >> | <: expr < Stream . lcons ( fun _ -> $ _ ) $ $ _ $ >> | <: exp...
let lev = find_pr_level " dot " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . sempty >> as e -> fun curr next _ k -> [ : ` next e " " k ] : ] ;
let lev = find_pr_level " simple " pr_expr . pr_levels in extfun lev . pr_rules with [ <: expr < Stream . iapp $ _ $ $ _ $ >> | <: expr < Stream . icons $ _ $ $ _ $ >> | <: expr < Stream . ising $ _ $ >> | <: expr < Stream . lapp ( fun _ -> $ _ ) $ $ _ $ >> | <: expr < Stream . lcons ( fun _ -> $ _ ) $ $ _ $ >> | <: ex...
let rec get = fun [ <: expr < Stream . iapp $ x $ $ y $ >> -> [ ( False , x ) :: get y ] | <: expr < Stream . icons $ x $ $ y $ >> -> [ ( True , x ) :: get y ] | <: expr < Stream . ising $ x $ >> -> [ ( True , x ) ] | <: expr < Stream . lapp ( fun _ -> $ x ) $ $ y $ >> -> [ ( False , x ) :: get y ] | <: expr < Stream ....