Skip to content

Refactor use of Events when generating verbose output #172

Open
@bmourad01

Description

@bmourad01

From #167, @ivg suggested the following:

I am seeing a lot of Events.(send @@ Info (sprintf fmt x y z..)), which are pretty hard to read and write, so I would suggest you to create an info function analogous to the BAP's info, that will have type, val info : ('a,formatter,unit) format -> 'a so that you can write,

Events.info "The patch has the following BIL: %a" Blk.pps blk;

Here is how to define it,

let info fmt =
  Format.kasprintf (fun msg -> send (Info msg)) fmt

The same functions could be defined for other types of events.

This could be a nice quality of life improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions