I assume I got the terminology in the tile wrong - let me know what I should have used instead for the below.
In PureScript by Example, section 8.17 Mutable State, there's a discussion of the type of runST:
runST :: forall a eff. (forall h. Eff (st :: ST h | eff) a) -> Eff eff a
The thing to notice here is that the region type h is quantified inside the parentheses on the left of the function arrow. That means that whatever action we pass to runST has to work with any region h whatsoever.
I understand the end goal, but can someone clarify this statement from the perspective of types and how this gets restricted as per above?
If possible, can the difference be shown on simpler types, e.g. what is the difference between:
f1 :: forall i o. Array i -> Array o
f2 :: forall o. (forall i. Array i) -> Array o
I think a short example would help.