ocaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

run the formatter

+24 -22
+4 -4
lib/compiler/Expand.ml
··· 200 200 { value = Syn.Dx_query (var, List.map expand positives, List.map expand negatives); loc } :: expand rest 201 201 | { value = Fun (xs, body); loc } :: rest -> 202 202 expand_lambda loc (xs, body) :: expand rest 203 - | { value = Object{ self; methods }; loc } :: rest -> 203 + | { value = Object { self; methods }; loc } :: rest -> 204 204 let self, methods = 205 205 let@ () = Sc.section [] in 206 206 let sym = Symbol.fresh () in ··· 212 212 sym, List.map expand_method methods 213 213 in 214 214 { value = Syn.Object { self; methods }; loc } :: expand rest 215 - | { value = Patch{ obj; self; methods }; loc } :: rest -> 215 + | { value = Patch { obj; self; methods }; loc } :: rest -> 216 216 let self, super, methods = 217 217 let@ () = Sc.section [] in 218 218 let self_sym = Symbol.fresh () in ··· 331 331 | Some (Term x, ()), _ -> 332 332 let relocate Range.{ value; _ } = Range.{ value; loc } in 333 333 List.map relocate x 334 - | Some (Xmlns{ xmlns; prefix }, ()), _ -> 334 + | Some (Xmlns { xmlns; prefix }, ()), _ -> 335 335 Reporter.emitf 336 336 ?loc 337 337 Resolution_error ··· 347 347 | None -> { xmlns = None; prefix = ""; uname } 348 348 | Some prefix -> 349 349 match Sc.resolve ["xmlns"; prefix] with 350 - | Some (Xmlns{ xmlns; prefix }, ()) -> 350 + | Some (Xmlns { xmlns; prefix }, ()) -> 351 351 { xmlns = Some xmlns; prefix = prefix; uname } 352 352 | _ -> 353 353 Reporter.emitf
+2 -1
lib/compiler/Parse.ml
··· 121 121 let end_position = lexbuf.lex_curr_p in 122 122 if is_opening_delim token then 123 123 let range = Range.of_lex_range (start_position, end_position) in 124 - Stack.push (token, range) delim_stack; ; 124 + Stack.push (token, range) delim_stack; 125 + ; 125 126 if is_closing_delim token then 126 127 begin 127 128 match Stack.top_opt delim_stack with
+1 -1
lib/frontend/Forest_reader.ml
··· 32 32 let eval { env; host } job = 33 33 let@ () = Reporter.easy_run in 34 34 match job with 35 - | Job.LaTeX_to_svg{ hash; source; content } -> 35 + | Job.LaTeX_to_svg { hash; source; content } -> 36 36 let svg = Build_latex.latex_to_svg ~env source in 37 37 let frontmatter = T.default_frontmatter ~iri: (Iri_scheme.hash_iri ~host hash) () in 38 38 let mainmatter = content ~svg in
+1 -1
lib/frontend/Import_graph.ml
··· 37 37 analyse_tree roots addr code 38 38 | Scope code | Namespace (_, code) | Group (_, code) | Math (_, code) | Let (_, _, code) | Fun (_, code) | Def (_, _, code) -> 39 39 analyse_code roots code 40 - | Object{ methods; _ } | Patch{ methods; _ } -> 40 + | Object { methods; _ } | Patch { methods; _ } -> 41 41 let@ _, code = List.iter @~ methods in 42 42 analyse_code roots code 43 43 | Dx_prop (rel, args) ->
+2 -2
lib/language_server/Analysis.ml
··· 85 85 end 86 86 | `Iri (env, iri) -> 87 87 match F.get_article iri with 88 - | Some{ frontmatter = { source_path = Some str; _ }; _ } -> 88 + | Some { frontmatter = { source_path = Some str; _ }; _ } -> 89 89 let p = EP.(env#fs / str) in 90 90 parse_path p 91 91 | _ -> ··· 110 110 | Fun (_, code) 111 111 | Def (_, _, code) -> 112 112 List.concat_map analyse_deps code 113 - | Object{ methods; _ } | Patch{ methods; _ } -> 113 + | Object { methods; _ } | Patch { methods; _ } -> 114 114 let@ code = List.concat_map @~ methods in 115 115 List.concat_map analyse_deps (snd code) 116 116 | _ ->
+7 -7
lib/language_server/Analysis.mli
··· 1 - module G : Forester_forest.Forest_graphs.S 2 - module F : Forester_forest.Forest.S 1 + module G: Forester_forest.Forest_graphs.S 2 + module F: Forester_forest.Forest.S 3 3 module L = Lsp.Types 4 4 5 5 val check : Base.server -> L.DocumentUri.t -> unit 6 6 7 - 8 7 val build_once : 9 - env:Forester_frontend.Forest_reader.env -> 10 - Base.server -> unit -> unit 8 + env: Forester_frontend.Forest_reader.env -> 9 + Base.server -> 10 + unit -> 11 + unit 11 12 12 13 val extract_addr : 13 14 Forester_compiler.Code.node Forester_core.Range.located -> 14 15 string option 15 16 16 17 val addr_at : 17 - position:Lsp.Types.Position.t -> 18 + position: Lsp.Types.Position.t -> 18 19 Forester_compiler.Code.t -> 19 20 string option 20 -
+5 -5
lib/language_server/LspServer.ml
··· 114 114 } -> 115 115 let triggerCharacter = 116 116 match context with 117 - | Some{ triggerCharacter; _ } -> 117 + | Some { triggerCharacter; _ } -> 118 118 triggerCharacter 119 119 | None -> None 120 120 in ··· 211 211 let content = 212 212 match F.get_article iri_under_cursor with 213 213 | None -> Format.asprintf "extracted iri %a" pp_iri iri_under_cursor 214 - | Some{ mainmatter; _ } -> 214 + | Some { mainmatter; _ } -> 215 215 PT.string_of_content mainmatter 216 216 in 217 217 Some ··· 256 256 let server = State.get () in 257 257 match Hashtbl.find_opt server.codes { uri = textDocument.uri } with 258 258 | None -> None 259 - | Some{ code; _ } -> 259 + | Some { code; _ } -> 260 260 List.filter_map 261 261 ( 262 262 fun ··· 347 347 Reporter.lsp_run publish_diagnostics uri @@ 348 348 fun () -> 349 349 Analysis.check server uri 350 - | DidSaveTextDocument{ textDocument; _; } -> 350 + | DidSaveTextDocument { textDocument; _; } -> 351 351 begin 352 352 match Hashtbl.find_opt server.documents textDocument with 353 353 (* ocaml-lsp does *this* here: https://github.com/ocaml/ocaml-lsp/blob/8b47925eb44f907b8ec41a44c1b2a55447f1b439/ocaml-lsp-server/src/ocaml_lsp_server.ml#L757 *) 354 354 | _ -> () 355 355 end 356 - | TextDocumentDidChange{ textDocument = { uri; _ }; contentChanges } -> 356 + | TextDocumentDidChange { textDocument = { uri; _ }; contentChanges } -> 357 357 begin 358 358 match Hashtbl.find_opt server.documents { uri } with 359 359 | Some doc ->
+2 -1
lib/language_server/Semantic_tokens.ml
··· 76 76 "modification"; 77 77 "documentation"; 78 78 "defaultLibrary" 79 - ];; 79 + ] 80 + ;; 80 81 end 81 82 82 83 let legend =