Hello everyone!
This is my first proposal, but it's not huge and I believe would yield some positive value to the elixir community. Every time we write bigger systems in Neon Tree Solutions Ltd we try to define all the specs and types to make the code look clearer. A pattern that emerges very commonly is writing a big comment block before a type, to describe what it does and how it's supposed to be used. And as elixir treats documentation as first class citizen I believe it would be a valuable feature to treat `@doc` blocks before types, the same way they are treated before functions. Right now they are just discarded with a warning: <https://lh3.googleusercontent.com/-es1jeezmflQ/WW1DPsb8SuI/AAAAAAAAAH8/lbaNVvX0ERwSlrbqGAGc4wXPbF1ZfWA2gCLcBGAs/s1600/Screen%2BShot%2B2017-07-18%2Bat%2B01.07.25.png> I am aware that it isn't simple in terms of implementation, since a `def` is a macro and a type is defined with a module attribute `@type`, but I think it'd be worth discussing a possible ways of implementing such feature. Plus imagine how beautiful Hex Docs would be if these gaps were filled: <https://lh3.googleusercontent.com/-IGKxdbsqM78/WW1DscQ2FKI/AAAAAAAAAIA/0H-DvlHplW0lpff6UqiTIj1U3focdWFMACLcBGAs/s1600/Screen%2BShot%2B2017-07-18%2Bat%2B01.07.49.png> Thank you for taking time discussing this topic! Cheers -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/098b967e-d38c-47aa-8783-34e76bff00c0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
