-module(gliff@types).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/gliff/types.gleam").
-export_type([raw_edit/0, edit/0, hunk/0, span/0, inline_edit/0, algorithm/0, cleanup/0, diff_config/0, diff_result/0, conflict/0, merge_result/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(
" Shared type definitions for the gliff diffing library.\n"
"\n"
" Import this module to access all types used in gliff's public API.\n"
).
-type raw_edit() :: {raw_equal, binary()} |
{raw_insert, binary()} |
{raw_delete, binary()}.
-type edit() :: {equal, list(binary())} |
{insert, list(binary())} |
{delete, list(binary())}.
-type hunk() :: {hunk, integer(), integer(), integer(), integer(), list(edit())}.
-type span() :: {unchanged, binary()} | {changed, binary()}.
-type inline_edit() :: {inline_equal, list(binary())} |
{inline_delete, list(span())} |
{inline_insert, list(span())}.
-type algorithm() :: myers | patience.
-type cleanup() :: no_cleanup | semantic_cleanup | semantic_lossless_cleanup.
-type diff_config() :: {diff_config, algorithm(), cleanup(), integer()}.
-type diff_result() :: {complete, list(edit())} | {truncated, list(edit())}.
-type conflict() :: {conflict, list(binary()), list(binary()), list(binary())}.
-type merge_result() :: {merge_ok, binary()} |
{merge_conflict, binary(), list(conflict())}.