Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor use of Events when generating verbose output #172

Open
bmourad01 opened this issue Mar 4, 2022 · 0 comments
Open

Refactor use of Events when generating verbose output #172

bmourad01 opened this issue Mar 4, 2022 · 0 comments

Comments

@bmourad01
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant