Current section

Files

Jump to
touch_grass src touch_grass@copy.erl
Raw

src/touch_grass@copy.erl

-module(touch_grass@copy).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/touch_grass/copy.gleam").
-export([lift/0, lower/0, decode/1, encode/1, type_/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(" Put a string value onto the clipboard\n").
-file("src/touch_grass/copy.gleam", 9).
-spec lift() -> eyg@analysis@type_@isomorphic:type(any()).
lift() ->
string.
-file("src/touch_grass/copy.gleam", 13).
-spec lower() -> eyg@analysis@type_@isomorphic:type(any()).
lower() ->
eyg@analysis@type_@isomorphic:result({record, empty}, string).
-file("src/touch_grass/copy.gleam", 21).
-spec decode(eyg@interpreter@value:value(MYA, MYB)) -> {ok, binary()} |
{error, eyg@interpreter@break:reason(MYA, MYB)}.
decode(Input) ->
eyg@interpreter@cast:as_string(Input).
-file("src/touch_grass/copy.gleam", 25).
-spec encode({ok, nil} | {error, binary()}) -> eyg@interpreter@value:value(any(), any()).
encode(Result) ->
case Result of
{ok, nil} ->
eyg@interpreter@value:ok(eyg@interpreter@value:unit());
{error, Reason} ->
eyg@interpreter@value:error({string, Reason})
end.
-file("src/touch_grass/copy.gleam", 17).
-spec type_() -> {binary(),
{fun(() -> eyg@analysis@type_@isomorphic:type(any())),
eyg@analysis@type_@isomorphic:type(any())}}.
type_() ->
{<<"Copy"/utf8>>, {fun lift/0, lower()}}.