text stringlengths 0 601k |
|---|
let f ( ) = 1 |
let f ( type t ) x = 1 |
let f ( module M : T ) = M . f |
let _ = f ( module M ) |
let z = ( compare ( x : int ) ( 1 + y : int ) : t ) |
let f x = A . B . c |
let f x y = 3 |
let f = fun x -> 4 |
let f = function x -> 1 |
let f x y z : t = 2 |
let f ( x , y ) z : t = 2 |
let f ( x : t ) ( y : ( ' a , ( a , int ) ) t ) = 2 |
let f ~ x y = 3 |
let f ~ x ( ? y = 2 ) = 3 |
let f ( X x ) y = 1 |
let f = fun ( x : int ) u ( y , z ) -> 4 |
let f = fun ( x : int ) u ( y , z ) -> 1 |
let f ( x : int ) u ( y , z ) = 1 |
let f = fun ( ? x = y - 1 ) z -> 1 |
let f = fun ( ? x = true ) z -> 1 |
let f = fun ( ? x = 1 = 1 ) z -> " two type of ' ' = in option ' x ' " |
let f x = fun u v ( u , c ) ( ? u = v - 1 ) ( ~ e : int ) -> 1 |
let f = fun x u -> 1 |
let f u0 ~ s : a s = " s : does not introduce a type " |
let f u0 ~ s ( : a , b ) s = " s : does not introduce a type " |
let f x : ret = body |
let f ( x ) : ret = body |
let f ? x ( : y = 1 ) ( ? y = ( x : t ) ) = body |
let f ? x ( : y = 1 ) ( ? y = ( x : t ) ) : ret = body |
let f ? x ( : y = expr + 1 ) ( y : t ) ~ z : u : ret = body |
let f ? x ( : y = ( expr + 1 ) ) ( y : t ) ? z : t : ret = body |
let x = call ~ l ( : fun x -> y = z ) |
let f { first ; second ; third } = body |
let f ( { first ; second ; third } as all ) = body |
let f a { first ; second ; third } b = body |
let f a ( { first ; second ; third } as all ) b = body |
let f a ( { first = x ; second = y ; third } as all ) b = body |
let f a [ x ; y ; z ] u = body |
let f ( type a ) x ( type b ) y = body |
let f ( A ( x : t ) , B x , { z = s ; p = Q e } ) = body |
let f ' u = if u . low >= 0 . then f ' _pos u . low u . high |
let f ' u = if u . low >= 0 . then f ' _pos u . low u . high |
let rec f ( A ( x : t ) , B x , { z = s ; p = Q e } ) = body |
let _ = f ~ foo : x ; ( f ~ foo : x ) ; ( f ~ foo : x y ) ; ( grault ~ garply ( : x ) ) ; let x = 1 + 3 / 2 in I . ( 1 +: 2 ) ; I . ( 1 +: 2 ) ; K . ( x |+ y ?: z ) ; ( expr ~- expr : ty ) ; ( expr ~ label : ty ) |
let x = 1 [ @@@ x rzfhjoi [ x ] ] |
let x = 1 [ @@ x " payload " ] |
let z = [ %% foo let x = 2 in x + 1 ] |
let _ = begin [ @ foo ] [ @ bar x ] . . . end |
let x = first ; % x second |
let x = begin % foo . . . end |
let f = fun % foo x -> x + 1 |
let f = fun % foo [ @ bar ] x -> x + 1 |
let f = fun [ @ bar ] x -> x + 1 |
let f = function % foo [ @ bar ] x -> x + 1 |
let content = [ % html { |< div id " = content " > some content </ div } ] >| |
let svgpath = [ % svg { |< path d " = M 0 1 L 1 0 " ></ path } ] >| |
let my_text = [ % html { | This is an < b > HTML </ b > formated < i > content </ i . } ] >| |
let my_span = Html . ( span ~ a [ : a_class [ " mytext " ] ] my_text ) |
let my_head = [ % html " < head " > my_title " </ head " ] > |
let _ = ( Jacobi . jacobi n ~ alpha : nu ~ beta : nu x ) ** 3 . |
module rec X = struct end |
module type X = Y with module Z = A |
module type X = Y with module Z . U = A and module A = B . C |
module type X = Y with type t = u and type u = l |
module A : E = B . C ( U ( V ) ) |
module A : B . C ( String ) . T = A |
module F ( A : Y ) = T |
module F ( A : X . Y ) = T |
module F ( A : X . t ) = T |
module F ( A : X ( Y ) . T ) = T |
module F ( A : X ( Y ( Z ) ) . T ) = A |
module F ( A : A1 ) ( B : B1 ) = Z |
module F = functor ( A : A1 ) -> functor ( B : B1 ) -> A . B . f |
let module X = F ( G ) in ( ) |
module Make_client ( IO : S . IO with type ' a t = ' a Lwt . t ) ( Request : Request with module IO = IO ) ( Response : Response with module IO = IO ) ( Net : Net with module IO = IO ) = struct end val mutable x = x_init method get_x = x method move d = x <- x + d method print = print_int s # get_x end ; ; object ( sel... |
let x = if x then y else z |
let _ = failwithf { | message } | |
let z = . < x + 1 . > ; ; |
module type T = sig val f : t -> t -> t end ; ; |
let sam_to_bam ( ~ run_with : Machine . t ) ~ reference_build file_t = let open KEDSL in let samtools = Machine . get_tool run_with Machine . Tool . Default . samtools in let src = file_t # product # path in let dest = sprintf " % s . % s " ( Filename . chop_suffix src " . sam " ) " bam " in let program = Program . ( M... |
let faidx ( ~ run_with : Machine . t ) fasta = let open KEDSL in let samtools = Machine . get_tool run_with Machine . Tool . Default . samtools in let src = fasta # product # path in let dest = sprintf " % s . % s " src " fai " in let program = Program . ( Machine . Tool . ( init samtools ) && exec [ " samtools " ; " f... |
let flagstat ( ~ run_with : Machine . t ) bam = let open KEDSL in let samtools = Machine . get_tool run_with Machine . Tool . Default . samtools in let src = bam # product # path in let dest = sprintf " % s . % s " src " flagstat " in let program = Program . ( Machine . Tool . ( init samtools ) && shf " samtools flagst... |
let bgzip ~ run_with input_file output_path = let open KEDSL in let samtools = Machine . get_tool run_with Machine . Tool . Default . samtools in let program = Program . ( Machine . Tool . ( init samtools ) && shf " bgzip % s - c > % s " input_file # product # path output_path ) in let name = sprintf " samtools - bgzip... |
let tabix ~ run_with ~ tabular_format input_file = let open KEDSL in let samtools = Machine . get_tool run_with Machine . Tool . Default . samtools in let output_path = input_file # product # path ^ " . tbi " in let minus_p_argument = match tabular_format with | ` Gff -> " gff " | ` Bed -> " bed " | ` Sam -> " sam " | ... |
let do_on_bam ( ~ run_with : Machine . t ) ( ? more_depends_on [ ] ) = ~ name ( ? more_requirements : Machine . Make_fun . Requirement . t list = [ ] ) input_bam ~ product ~ make_command = let open KEDSL in let samtools = Machine . get_tool run_with Machine . Tool . Default . samtools in let src = input_bam # product #... |
let sort_bam_no_check ( ~ run_with : Machine . t ) ~ by input_bam = let source = input_bam # product # path in let dest_suffix = match by with | ` Coordinate -> " sorted " | ` Read_name -> " read - name - sorted " in let dest_prefix = sprintf " % s -% s " ( Filename . chop_suffix source " . bam " ) dest_suffix in let d... |
let sort_bam_if_necessary ( ~ run_with : Machine . t ) ~ by input_bam : KEDSL . bam_file KEDSL . workflow_node = match input_bam # product # sorting with | Some some when some = by -> input_bam | other -> sort_bam_no_check ~ run_with input_bam ~ by |
let index_to_bai ( ~ run_with : Machine . t ) ( ? check_sorted = true ) input_bam = begin match input_bam # product # sorting with | ( Some ` Read_name | None ) when check_sorted -> failwithf " In function Samtools . index_to_bai the input bam % s \ is not declared as sorted - by - coordinate ( samtools - index \ requi... |
let mpileup ~ run_with ? adjust_mapq ~ region input_bam = let open KEDSL in let samtools = Machine . get_tool run_with Machine . Tool . Default . samtools in let src = input_bam # product # path in let adjust_mapq_option = match adjust_mapq with | None -> " " | Some n -> sprintf " - C % d " n in let samtools_region_opt... |
let merge_bams ( ~ run_with : Machine . t ) ( ? delete_input_on_success = true ) ( ? attach_rg_tag = false ) ( ? uncompressed_bam_output = false ) ( ? compress_level_one = false ) ( ? combine_rg_headers = false ) ( ? combine_pg_headers = false ) ( input_bam_list : KEDSL . bam_file KEDSL . workflow_node list ) ( output_... |
module Package = struct type t = | Opam of Opam . Package . t | Esy of Esy . Package . t let of_opam opam_pkg = Opam opam_pkg let of_esy opam_pkg = Esy opam_pkg let name t = match t with | Opam pkg -> Opam . Package . name pkg | Esy pkg -> Esy . Package . name pkg let version t = match t with | Opam pkg -> Opam . Packa... |
type t = | Opam of Opam . t * Opam . Switch . t | Esy of Esy . t * Esy . Manifest . t | Global | Custom of string |
let equal t1 t2 = match ( t1 , t2 ) with | Global , Global -> true | Esy ( e1 , p1 ) , Esy ( e2 , p2 ) -> Esy . Manifest . equal p1 p2 && Esy . equal e1 e2 | Opam ( o1 , s1 ) , Opam ( o2 , s2 ) -> Opam . Switch . equal s1 s2 && Opam . equal o1 o2 | Custom s1 , Custom s2 -> String . equal s1 s2 | _ , _ -> false |
let to_string = function | Esy ( _ , root ) -> Printf . sprintf " esy ( % s ) " ( Esy . Manifest . path root |> Path . to_string ) | Opam ( _ , switch ) -> Printf . sprintf " opam ( % s ) " ( Opam . Switch . name switch ) | Global -> " global " | Custom _ -> " custom " |
let to_pretty_string t = let print_opam = Printf . sprintf " opam ( % s ) " in let print_esy = Printf . sprintf " esy ( % s ) " in match t with | Esy ( _ , root ) -> let project_name = Esy . Manifest . path root |> Path . basename in print_esy project_name | Opam ( _ , Named name ) -> print_opam name | Opam ( _ , Local... |
module Kind = struct type t = | Opam | Esy | Global | Custom module Hmap = struct type ( ' opam , ' esy , ' global , ' custom ) t = { opam : ' opam ; esy : ' esy ; global : ' global ; custom : ' custom } end let of_string = function | " opam " -> Some Opam | " esy " -> Some Esy | " global " -> Some Global | " custom " ... |
module Setting = struct type t = | Opam of Opam . Switch . t | Esy of Esy . Manifest . t | Global | Custom of string let kind : t -> Kind . t = function | Opam _ -> Opam | Esy _ -> Esy | Global -> Global | Custom _ -> Custom let of_json json = let decode_vars json = Settings . resolve_workspace_vars ( Jsonoo . Decode .... |
let available_sandboxes ( ) = { Kind . Hmap . opam = Opam . make ( ) ; esy = Esy . make ( ) ; global = ( ) ; custom = ( ) } |
let of_settings ( ) : t option Promise . t = let open Promise . Syntax in let available = available_sandboxes ( ) in let not_available kind = let this_ = match kind with | ` Esy -> " esy " | ` Opam -> " opam " in show_message ` Warn " This workspace is configured to use an % s sandbox , but % s isn ' t \ available " th... |
let workspace_root ( ) = match Workspace . workspaceFolders ( ) with | [ ] -> None | [ workspace_folder ] -> Some ( workspace_folder |> WorkspaceFolder . uri |> Uri . path |> Path . of_string ) | _ -> None |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.