[erlang-questions] Type specs unavailable in code compiled from core erlang?

Eric Merritt <>
Thu Jan 5 21:11:59 CET 2012


> I didn't make myself very clear there did I. Indeed when I said "attributes"
> I was referring to what gets returned from module_info/0 rather than the
> attributes chunk - a separate chunk would be much better. Even better still
> would be the ability to do module_info(specs). Does the existing module_info
> return value contain any information about exported types? If not, would you
> want something like module_info(exported_types) as well?

We are in agreement across the board. Though, non-exported types are
not actually useful outside of the module itself I don't believe,
assuming of course, that all types used in specs for publicly exported
functions are also exported. So your module_info(exported_types) is
really a synonym for module_info(types). I hope that description is as
clear in what I have written as it is in my head.

>
> Also, both dialyzer and PropEr seem to have some concept of a type_server
> that has utility functions for inspecting and interacting with types.
> Personally I think a utility module/library (after erl_syntax/erl_syntax_lib
> and the like) would make for a worthwhile (separate) EEP also.

I agree, though I don't see why they shouldn't be part of the same eep?



More information about the erlang-questions mailing list