text stringlengths 0 601k |
|---|
let equal_backtraces b1 b2 = Array . length b1 = Array . length b2 && Array . for_all2 ( fun s1 s2 -> Int . equal ( s1 : raw_backtrace_entry :> int ) ( s2 : raw_backtrace_entry :> int ) ) b1 b2 |
let rec foo x stack = let r = local_ ref x in r := ! r - 1 ; let stack ' = get_backtrace ( ) in begin match stack with | None -> ( ) | Some stack -> assert ( equal_backtraces stack stack ' ) end ; if ! r <= 0 then ( ) else foo ! r ( Some stack ' ) |
let ( ) = foo 20 None let stack ' = get_backtrace ( ) in assert ( equal_backtraces stack stack ' ) ; ( ) |
let foo ( ) = let stack = get_backtrace ( ) in bar stack local_ ref 0 r := 10 let in_tail_call = local_stack_offset ( ) in assert ( original = in_tail_call ) let original = local_stack_offset ( ) in let r = allocate ( ) in let with_ref = local_stack_offset ( ) in assert ( with_ref > original ) ; use r ; bar original |
let ( ) = foo ( ) let original = local_stack_offset ( ) in let r = allocate ( ) in let with_ref = local_stack_offset ( ) in assert ( with_ref > original ) ; use r ; f original |
let ( ) = foo bar ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ... |
let ( ) = foo ( ) let original = local_stack_offset ( ) in let r = allocate ( ) in let with_ref = local_stack_offset ( ) in assert ( with_ref > original ) ; use r ; f original ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ... |
let ( ) = foo bar match previous with | None -> let original = local_stack_offset ( ) in let r = allocate ( ) in let with_ref = local_stack_offset ( ) in assert ( with_ref > original ) ; use r ; foo ( Some original ) | Some original -> let in_tail_call = local_stack_offset ( ) in assert ( original = in_tail_call ) |
let ( ) = foo None |
let ( ) = assert ( ( lret 1 2 ) + 1 = 4 ) |
let gray50 = ` Hex " # F9FAFB " |
let gray100 = ` Hex " # F3F4F6 " |
let gray200 = ` Hex " # E5E7EB " |
let gray300 = ` Hex " # D1D5DB " |
let gray400 = ` Hex " # 9CA3AF " |
let gray500 = ` Hex " # 6B7280 " |
let gray600 = ` Hex " # 4B5563 " |
let gray700 = ` Hex " # 374151 " |
let gray800 = ` Hex " # 1F2937 " |
let gray900 = ` Hex " # 111827 " |
let red50 = ` Hex " # FEF2F2 " |
let red100 = ` Hex " # FEE2E2 " |
let red200 = ` Hex " # FECACA " |
let red300 = ` Hex " # FCA5A5 " |
let red400 = ` Hex " # F87171 " |
let red500 = ` Hex " # EF4444 " |
let red600 = ` Hex " # DC2626 " |
let red700 = ` Hex " # B91C1C " |
let red800 = ` Hex " # 991B1B " |
let red900 = ` Hex " # 7F1D1D " |
let yellow50 = ` Hex " # FFFBEB " |
let yellow100 = ` Hex " # FEF3C7 " |
let yellow200 = ` Hex " # FDE68A " |
let yellow300 = ` Hex " # FCD34D " |
let yellow400 = ` Hex " # FBBF24 " |
let yellow500 = ` Hex " # F59E0B " |
let yellow600 = ` Hex " # D97706 " |
let yellow700 = ` Hex " # B45309 " |
let yellow800 = ` Hex " # 92400E " |
let yellow900 = ` Hex " # 78350F " |
let green50 = ` Hex " # ECFDF5 " |
let green100 = ` Hex " # D1FAE5 " |
let green200 = ` Hex " # A7F3D0 " |
let green300 = ` Hex " # 6EE7B7 " |
let green400 = ` Hex " # 34D399 " |
let green500 = ` Hex " # 10B981 " |
let green600 = ` Hex " # 059669 " |
let green700 = ` Hex " # 047857 " |
let green800 = ` Hex " # 065F46 " |
let green900 = ` Hex " # 064E3B " |
let blue50 = ` Hex " # EFF6FF " |
let blue100 = ` Hex " # DBEAFE " |
let blue200 = ` Hex " # BFDBFE " |
let blue300 = ` Hex " # 93C5FD " |
let blue400 = ` Hex " # 60A5FA " |
let blue500 = ` Hex " # 3B82F6 " |
let blue600 = ` Hex " # 2563EB " |
let blue700 = ` Hex " # 1D4ED8 " |
let blue800 = ` Hex " # 1E40AF " |
let blue900 = ` Hex " # 1E3A8A " |
let indigo50 = ` Hex " # EEF2FF " |
let indigo100 = ` Hex " # E0E7FF " |
let indigo200 = ` Hex " # C7D2FE " |
let indigo300 = ` Hex " # A5B4FC " |
let indigo400 = ` Hex " # 818CF8 " |
let indigo500 = ` Hex " # 6366F1 " |
let indigo600 = ` Hex " # 4F46E5 " |
let indigo700 = ` Hex " # 4338CA " |
let indigo800 = ` Hex " # 3730A3 " |
let indigo900 = ` Hex " # 312E81 " |
let purple50 = ` Hex " # F5F3FF " |
let purple100 = ` Hex " # EDE9FE " |
let purple200 = ` Hex " # DDD6FE " |
let purple300 = ` Hex " # C4B5FD " |
let purple400 = ` Hex " # A78BFA " |
let purple500 = ` Hex " # 8B5CF6 " |
let purple600 = ` Hex " # 7C3AED " |
let purple700 = ` Hex " # 6D28D9 " |
let purple800 = ` Hex " # 5B21B6 " |
let purple900 = ` Hex " # 4C1D95 " |
let pink50 = ` Hex " # FDF2F8 " |
let pink100 = ` Hex " # FCE7F3 " |
let pink200 = ` Hex " # FBCFE8 " |
let pink300 = ` Hex " # F9A8D4 " |
let pink400 = ` Hex " # F472B6 " |
let pink500 = ` Hex " # EC4899 " |
let pink600 = ` Hex " # DB2777 " |
let pink700 = ` Hex " # BE185D " |
let pink800 = ` Hex " # 9D174D " |
let pink900 = ` Hex " # 831843 " |
let tail_operator = function | { exp_desc = Texp_ident ( _ , _ , { Types . val_kind = Types . Val_prim { Primitive . prim_name = " % sequand " " |% sequor " ; _ } ; _ } ) ; _ } -> true | _ -> false |
let expr_tail_positions = function | Texp_apply ( callee , args ) when tail_operator callee -> begin match List . last args with | None | Some ( _ , None ) -> [ ] | Some ( _ , Some expr ) -> [ Expression expr ] end | Texp_instvar _ | Texp_setinstvar _ | Texp_override _ | Texp_assert _ | Texp_lazy _ | Texp_object _ | Te... |
let tail_positions = function | Expression expr -> expr_tail_positions expr . exp_desc | Case case -> [ Expression case . c_rhs ] | _ -> [ ] |
let expr_entry_points = function | Texp_function { cases ; _ } -> List . map cases ~ f ( : fun c -> Case c ) | _ -> [ ] |
let entry_points = function | Expression expr -> expr_entry_points expr . exp_desc | _ -> [ ] |
let is_call = function | Expression { exp_desc = Texp_apply _ ; _ } -> true | _ -> false |
type loc = bool * int |
type verb = Verbose | Quiet |
type follow = Name | Descriptor |
let opt_str sv = function None -> " None " | Some v -> str " Some ( % s ) " ( sv v ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.