Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Indeed, that is a somewhat contrived example that is meant to illustrate that ScopedTypeVariables aren't just limited to standalone type signature declarations—they can also be used in arbitrary subexpressions as well. Whether you prefer to use type signature declarations or expression type signatures largely depends on your personal tastes, but both styles are used in the "real world". For instance, here is one example of a use of expression type signatures + ScopedTypeVariables in the profunctors library.¹
If this seems weird and ad hoc, it's because it is. There is a proposal to remove this special case here, but it's blocked by none other than the proposal mentioned at the end of the blog post. Yet another reason why I'm looking forward to the latter proposal :)