Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
flint__c_generated_functions__Function_description__Function.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74module CI = Cstubs_internals external flint_stubs_1_fmpz_clear : _ CI.fatptr -> unit = "flint_stubs_1_fmpz_clear" external flint_stubs_2_fmpz_get_si : _ CI.fatptr -> Signed.long = "flint_stubs_2_fmpz_get_si" external flint_stubs_3_fmpz_set_si : _ CI.fatptr -> Signed.long -> unit = "flint_stubs_3_fmpz_set_si" external flint_stubs_4_fmpz_init : _ CI.fatptr -> unit = "flint_stubs_4_fmpz_init" external flint_stubs_5_fmpz_init_set_ui : _ CI.fatptr -> Unsigned.ulong -> unit = "flint_stubs_5_fmpz_init_set_ui" external flint_stubs_6_fmpq_clear : _ CI.fatptr -> unit = "flint_stubs_6_fmpq_clear" external flint_stubs_7_fmpq_set_fmpz_frac : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> unit = "flint_stubs_7_fmpq_set_fmpz_frac" external flint_stubs_8_free : _ CI.fatptr -> unit = "flint_stubs_8_free" external flint_stubs_9_strlen : _ CI.fatptr -> Unsigned.size_t = "flint_stubs_9_strlen" type 'a result = 'a type 'a return = 'a type 'a fn = | Returns : 'a CI.typ -> 'a return fn | Function : 'a CI.typ * 'b fn -> ('a -> 'b) fn let map_result f x = f x let returning t = Returns t let (@->) f p = Function (f, p) let foreign : type a b. string -> (a -> b) fn -> (a -> b) = fun name t -> match t, name with | Function (CI.Pointer _, Returns (CI.Primitive CI.Size_t)), "strlen" -> (fun x1 -> let CI.CPointer x2 = x1 in flint_stubs_9_strlen x2) | Function (CI.Pointer _, Returns CI.Void), "free" -> (fun x3 -> let CI.CPointer x4 = x3 in flint_stubs_8_free x4) | Function (CI.Pointer _, Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void))), "fmpq_set_fmpz_frac" -> (fun x5 x7 x9 -> let CI.CPointer x10 = x9 in let CI.CPointer x8 = x7 in let CI.CPointer x6 = x5 in flint_stubs_7_fmpq_set_fmpz_frac x6 x8 x10) | Function (CI.Pointer _, Returns CI.Void), "fmpq_clear" -> (fun x11 -> let CI.CPointer x12 = x11 in flint_stubs_6_fmpq_clear x12) | Function (CI.Pointer _, Function (CI.Primitive CI.Ulong, Returns CI.Void)), "fmpz_init_set_ui" -> (fun x13 x15 -> let CI.CPointer x14 = x13 in flint_stubs_5_fmpz_init_set_ui x14 x15) | Function (CI.Pointer _, Returns CI.Void), "fmpz_init" -> (fun x16 -> let CI.CPointer x17 = x16 in flint_stubs_4_fmpz_init x17) | Function (CI.Pointer _, Function (CI.Primitive CI.Long, Returns CI.Void)), "fmpz_set_si" -> (fun x18 x20 -> let CI.CPointer x19 = x18 in flint_stubs_3_fmpz_set_si x19 x20) | Function (CI.Pointer _, Returns (CI.Primitive CI.Long)), "fmpz_get_si" -> (fun x21 -> let CI.CPointer x22 = x21 in flint_stubs_2_fmpz_get_si x22) | Function (CI.Pointer _, Returns CI.Void), "fmpz_clear" -> (fun x23 -> let CI.CPointer x24 = x23 in flint_stubs_1_fmpz_clear x24) | _, s -> Printf.ksprintf failwith "No match for %s" s let foreign_value : type a. string -> a Ctypes.typ -> a Ctypes.ptr = fun name t -> match t, name with | _, s -> Printf.ksprintf failwith "No match for %s" s