package lsp

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file user_warning.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 1 "submodules/dune/otherlibs/stdune/user_warning.ml"
let reporter = ref (fun msg -> User_message.prerr msg)

let set_reporter f = reporter := f

let emit ?loc ?hints ?(is_error = false) paragraphs =
  if is_error then
    User_error.raise ?loc ?hints paragraphs
  else
    !reporter
      (User_message.make paragraphs ?loc ?hints
         ~prefix:
           (Pp.seq
              (Pp.tag User_message.Style.Warning (Pp.verbatim "Warning"))
              (Pp.char ':')))
OCaml

Innovation. Community. Security.