Module Catala_utils.Mark

AST node annotations (used for position, type, etc.)

type ('a, 'm) ed = 'a * 'm

The type of Mark.ed values. Everything related to the source code should keep at least its position stored, to improve error messages. Typing, etc. also leverage this.

type 'a pos = ( 'a, Pos.t ) ed

The type of marks containing only position information

val add : 'm -> 'a -> ( 'a, 'm ) ed
val remove : ( 'a, 'm ) ed -> 'a
val get : ( 'a, 'm ) ed -> 'm
val map : ( 'a -> 'b ) -> ( 'a, 'm ) ed -> ( 'b, 'm ) ed
val map_mark : ( 'm1 -> 'm2 ) -> ( 'a, 'm1 ) ed -> ( 'a, 'm2 ) ed
val copy : ( 'b, 'm ) ed -> 'a -> ( 'a, 'm ) ed
val fold : ( 'a -> 'b ) -> ( 'a, _ ) ed -> 'b
val fold2 : ( 'a -> 'a -> 'b ) -> ( 'a, 'm ) ed -> ( 'a, 'm ) ed -> 'b
val compare : ( 'a -> 'a -> int ) -> ( 'a, 'm ) ed -> ( 'a, 'm ) ed -> int

Compares two marked values ignoring marks

val equal : ( 'a -> 'a -> bool ) -> ( 'a, 'm ) ed -> ( 'a, 'm ) ed -> bool

Tests equality of two marked values ignoring marks

Visitors

class 'self marked_map : object ... end
class 'self marked_iter : object ... end
class 'self pos_map : object ... end
class 'self pos_iter : object ... end