type specification

Serge Aleynikov serge@REDACTED
Fri Jul 2 17:45:55 CEST 2010


Can user-defined type specification be imported from or referenced to 
another module?

E.g. if I have a function that returns date/time value in the same 
format as calendar:now_to_local_time/1 whose type t_datetime1970() is 
defined in the calendar module, what would the -spec of my function be:

-spec local_time() -> ???
local_time() ->
     calendar:now_to_local_time(now()).


More information about the erlang-questions mailing list