wa_diff (assert v1.0.1)
Summary
Types
-type block() :: {'__block__', meta(), [supported_input()]}.
-type break() :: binary().
-type container_type() :: tuple | list.
-type contents() :: #{contents := [content()]}.
-type context() :: #{records => #{{atom(), pos_integer()} => [atom()]}}.
-type delimiter() :: binary().
-type doc() :: erlfmt_algebra:doc().
-type error_description() :: #{pos_integer() => unicode:chardata(), general => unicode:chardata(), reason => unicode:chardata()}.
-type meta() :: [{diff, boolean()}].
-type script() :: diffy:diffs().
-type side() :: contents() | literal() | {container_type(), meta(), [side()]} | block() | {struct_type(), meta(), [side()]} | struct_item().
-type struct_type() :: map | {record, atom()}.
Functions
-spec compute(supported_input(), supported_input()) -> diff().
-spec compute(supported_input(), supported_input(), atom()) -> diff().
-spec error_info(module(), dynamic(), dynamic()) -> {ok, error_info()} | {error, no_error_info}.
-spec format_error(term(), erlang:stacktrace()) -> error_description().
-spec green() -> binary().
-spec red() -> binary().
-spec reset() -> binary().
-spec to_algebra(side(), wrapper_fun()) -> doc().