r/purescript • u/Lokathor • Feb 12 '16
Why have explicit universal quantification?
It seems to me, coming from Haskell, that requiring every type signature to include the explicit universal quantification just leads to a lot of line noise. Particularly when there's also a typeclass constraint.
Are there plans to make a compiler option that would remove the need to explicitly give the universal qualification? Why was it even chosen in the first place?
5
Upvotes
View all comments
Show parent comment
2
u/FranklinChen Feb 13 '16
Here's information about higher-rank types, which are an extension in Haskell but are a standard part of PureScript: https://wiki.haskell.org/Rank-N_types and a tutorial https://ocharles.org.uk/blog/guest-posts/2014-12-18-rank-n-types.html
You need an explicit
forallin order to write functions that have types such asNote that this is a very different type from