
-module(extype14).

-export_type([exported/0]).

-export_type([myt/1]).

-type exported() ::  atom().

-opaque myt(X) ::  integer() | X | list(myt(X)) | myt2().

-type myt2() ::  atom() | myt(atom()).

-record(myr,  {myfielda :: myt(myt(myt(tuple())))}).

-spec io:format([integer()]) -> ok.

-spec f(ArgName :: {atom(), []} | [myt(atom())], X) -> myt(myt(integer())) when X :: integer();
        ([], Y) -> ok when Y :: atom().

f([], X) ->
    X;
f({X, []}, Y) ->
    [Y, Y, g()].

g() ->
    io:format("asdf").
