Current section
Files
Jump to
Current section
Files
src/stacky@internal@example.erl
-module(stacky@internal@example).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([main/0]).
-spec main() -> stacky:stack_trace().
main() ->
Stacktrace = stacky:trace(),
gleam@io:print(<<"\n"/utf8>>),
gleam@io:println(<<"Trace to string:"/utf8>>),
_pipe = Stacktrace,
stacky:print_trace(_pipe),
gleam@io:print(<<"\n"/utf8>>),
gleam@io:println(<<"Frame:"/utf8>>),
Stackframe = begin
_pipe@1 = Stacktrace,
_pipe@2 = stacky:frame(_pipe@1, 0),
pprint:debug(_pipe@2)
end,
gleam@io:print(<<"\n"/utf8>>),
gleam@io:print(<<"Gleam module: "/utf8>>),
_pipe@3 = Stackframe,
_pipe@4 = stacky:gleam_module_name(_pipe@3),
gleam@io:println(_pipe@4),
gleam@io:print(<<"\n"/utf8>>),
gleam@io:println(<<"Frame with context:"/utf8>>),
_pipe@5 = Stackframe,
stacky:print_frame_with(_pipe@5, {<<"my_context"/utf8>>}),
gleam@io:print(<<"\n"/utf8>>),
gleam@io:println(<<"Internal stack frame:"/utf8>>),
_pipe@6 = Stacktrace,
pprint:debug(_pipe@6).