@@ -250,7 +250,7 @@ to_str(Arg) when is_list(Arg) ->
250250% %% Internal
251251% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
252252
253- -spec source_encoding (binary () | list () ) -> latin1 | utf8 .
253+ -spec source_encoding (binary ()) -> latin1 | utf8 .
254254source_encoding (Source ) ->
255255 Re = " .*\n ?.*(coding *[:=] *(?<encoding>[-a-zA-Z0-9]+))" ,
256256 ReOpts = [firstline , {capture , all_names , list }],
@@ -836,7 +836,7 @@ to_map(Parsed) when is_tuple(Parsed) ->
836836to_map (Parsed ) ->
837837 throw ({unexpected_abstract_form , Parsed }).
838838
839- -spec macro_name (any ()) -> string ().
839+ -spec macro_name (erl_syntax : syntaxTree ()) -> string ().
840840macro_name (Name ) ->
841841 case erl_syntax :type (Name ) of
842842 atom ->
@@ -855,7 +855,7 @@ macro_name(Name) ->
855855% % NOTE: Copied from ktn_lists not to bring the whole erlang-katana
856856% % repo as a dependency here
857857% % @end
858- -spec split_when (fun (), list ()) -> list () .
858+ -spec split_when (fun (( T ) -> boolean ()), [ T ]) -> [[ T ]] .
859859split_when (When , List ) ->
860860 split_when (When , List , [[]]).
861861
0 commit comments