<div dir="ltr">I personally really dislike type synonyms, 9 times out of 10 I would prefer to just read a full type than the obscured synonym which hides useful structure from me.</div><div class="gmail_extra"><br><div class="gmail_quote">On 17 January 2015 at 20:06, Julian Ospald <span dir="ltr"><<a href="mailto:hasufell@posteo.de" target="_blank">hasufell@posteo.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I've recently had a discussion about type synonyms and when to use them<br>
in haskell.<br>
<br>
On the one hand, they make reading type signatures easier and tell you<br>
what is meant, not just what is inside. On the other hand they also sort<br>
of hide what is inside, although you will probably need to know exactly<br>
that when using them. This might make reading code for new collaborators<br>
more difficult if they have to memorize all type synonyms first.<br>
<br>
So there are basically a few questions:<br>
* What do you think is a good policy for when and how to use them? Or<br>
would you say just not use them at all and put equivalent information in<br>
parameter documentation?<br>
* What are the upsides, downsides, pitfalls and also alternatives? (for<br>
completeness, also since<br>
<a href="https://www.haskell.org/haskellwiki/Type_synonym" target="_blank">https://www.haskell.org/haskellwiki/Type_synonym</a> is a bit sparse)<br>
* Can we do something to improve the downsides? Or is there already<br>
something? (e.g. editor/IDE that can tell me the underlying type, error<br>
messages etc.)<br>
<br>
<br>
--<br>
Regards,<br>
Julian Ospald<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>