- 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 
                        %% This function is needed as a hack to guide dialyzer into inferring
%% the correct types.
-spec id(A) -> A.
id(A) ->
  A.
%% Где-то в header'е....
-define(deftarget(RECIPE), {RECIPE, fun my_module:id/1}).
%% A horrible, horrible hack to make Dialyzer infer right type of the promise return value
-define(want(TARGET),
        (fun() ->
             case TARGET of
               {_, ___IAmSorryYouHaveToSeeThisWorkaroundForDialyzer} ->
                 ___IAmSorryYouHaveToSeeThisWorkaroundForDialyzer(my_module:want(TARGET))
             end
         end)()).
                                 
        
Комментарии (3) RSS
Добавить комментарий