From 893ea5219eb74aedf93bd53f23b5e050fb9acbf6 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Sat, 25 Jun 2016 16:05:25 +0200 Subject: [feedback] Allow messages to carry a location. The new warnings mechanism may which to forward a location to IDEs. This also makes sense for other message types. Next step is to remove redundant MsgError feedback type. --- lib/feedback.ml | 6 +++--- lib/feedback.mli | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/feedback.ml b/lib/feedback.ml index 12b8b27ff4..c2b512e991 100644 --- a/lib/feedback.ml +++ b/lib/feedback.ml @@ -36,8 +36,8 @@ type feedback_content = | FileLoaded of string * string (* Extra metadata *) | Custom of Loc.t * string * xml - (* Old generic messages *) - | Message of level * Richpp.richpp + (* Generic messages *) + | Message of level * Loc.t option * Richpp.richpp type feedback = { id : edit_or_state_id; @@ -142,7 +142,7 @@ let feedback ?id ?route what = let feedback_logger ?loc lvl msg = feedback ~route:!feedback_route ~id:!feedback_id - (Message (lvl, Richpp.richpp_of_pp msg)) + (Message (lvl, loc, Richpp.richpp_of_pp msg)) (* Output to file *) let ft_logger old_logger ft ?loc level mesg = diff --git a/lib/feedback.mli b/lib/feedback.mli index 7b293ae30b..36fb3867fb 100644 --- a/lib/feedback.mli +++ b/lib/feedback.mli @@ -46,7 +46,7 @@ type feedback_content = (* Extra metadata *) | Custom of Loc.t * string * xml (* Old generic messages *) - | Message of level * Richpp.richpp + | Message of level * Loc.t option * Richpp.richpp type feedback = { id : edit_or_state_id; (* The document part concerned *) -- cgit v1.2.3