Specified quantification of RuntimeRep for function arrow (->)
Separating specifying quantifiers of (->)
!3132 (closed) into this ticked.
I wanted to make sure quantification was specified explicitly, rather than inferred. One of those was the function arrow so I changed the implementation to
(->) :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep). TYPE rep1 -> TYPE rep2 -> Type
so one could write (->) @LiftedRep @LiftedRep
.
Richard objected:
This change is more controversial than you might think. As
->
evolves, it may gain all manner of extra arguments. Keeping theseInferred
helps protect backward compatibility. Of course, changing toSpecified
helps those who want to specialize. I see both sides of the story.More immediately, this may spell trouble for changes coming with linear types. @monoidal do you have any thoughts here?
so I will remove it from the merge request. I will point out that in the documentation (grepping (->) ::
under compiler/) the type of (->)
is mentioned in four places with a specified quantification. Should they be changed to inferred
-- | The @(->)@ type constructor.
--
-- @
-- (->) :: forall {rep1 :: RuntimeRep} {rep2 :: RuntimeRep}.
-- TYPE rep1 -> TYPE rep2 -> Type
-- @