Cannot talk about programming in Haskell types without mentioning this: https://aphyr.com/posts/342-typing-the-technical-interview
So, GHC’s type system, not Haskell’s
Ah, a fellow jhc user, I presume?
While you’re certainly correct, Haskell and GHC are synonymous for most people at this point. Whether or not that’s a good thing is another question, but it’s the state that we’re in regardless.
I really wish there was the ability to have lexically-scoped type synonyms. So many gnarly type signatures would be way more comprehensible if I could use a name for parts of them. As it stands it feels almost like assembly where there are only global variables.
Do any examples come to mind where you’d like to use this feature?
I think when using Servant (https://docs.servant.dev/en/stable/tutorial/Client.html) it would have come in handy. You can get pretty far with type synonyms, but it’s a global namespace which has all the classic problems that come with not being able to scope names