src/Pure/General/position.ML
changeset 48992 0518bf89c777
parent 48767 7f0c469cc796
child 49528 789b73fcca72
equal deleted inserted replaced
48991:0350245dec1c 48992:0518bf89c777
    39   type report = T * Markup.T
    39   type report = T * Markup.T
    40   type report_text = report * string
    40   type report_text = report * string
    41   val reports_text: report_text list -> unit
    41   val reports_text: report_text list -> unit
    42   val reports: report list -> unit
    42   val reports: report list -> unit
    43   val store_reports: report list Unsynchronized.ref -> T list -> ('a -> Markup.T list) -> 'a -> unit
    43   val store_reports: report list Unsynchronized.ref -> T list -> ('a -> Markup.T list) -> 'a -> unit
    44   val str_of: T -> string
    44   val here: T -> string
    45   type range = T * T
    45   type range = T * T
    46   val no_range: range
    46   val no_range: range
    47   val set_range: range -> T
    47   val set_range: range -> T
    48   val reset_range: T -> T
    48   val reset_range: T -> T
    49   val range: T -> T -> range
    49   val range: T -> T -> range
   178   | store_reports (r: report list Unsynchronized.ref) ps markup x =
   178   | store_reports (r: report list Unsynchronized.ref) ps markup x =
   179       let val ms = markup x
   179       let val ms = markup x
   180       in Unsynchronized.change r (fold (fn p => fold (fn m => cons (p, m)) ms) ps) end;
   180       in Unsynchronized.change r (fold (fn p => fold (fn m => cons (p, m)) ms) ps) end;
   181 
   181 
   182 
   182 
   183 (* str_of *)
   183 (* here: inlined formal markup *)
   184 
   184 
   185 fun str_of pos =
   185 fun here pos =
   186   let
   186   let
   187     val props = properties_of pos;
   187     val props = properties_of pos;
   188     val s =
   188     val s =
   189       (case (line_of pos, file_of pos) of
   189       (case (line_of pos, file_of pos) of
   190         (SOME i, NONE) => "(line " ^ string_of_int i ^ ")"
   190         (SOME i, NONE) => "(line " ^ string_of_int i ^ ")"