[erlang-questions] Why is calendar not exporting its types?

David Mercer <>
Tue Oct 25 17:00:02 CEST 2011


On Tuesday, October 25, 2011, Torben Hoffmann wrote:

> I have some code where I would like to annotate it with type
> specfications, but all the nice types that calendar defines are not
> exported. (t_now() is, but that is the only one).
> 
> Right now I will define my own types for these, but it seems weird to
> me
> that the types are not exported from the calendar module.

I didn't know that they weren't exported.  Just in the past day, I've been
writing some code that uses the calendar module, annotating it with calendar
types, but as far as I can tell, the compiler doesn't actually care if the
type was actually exported or not.  Which downstream tool is going to throw
the hissy-fit about it?  Dialyzer?

Cheers,

DBM




More information about the erlang-questions mailing list