Changes between Initial Version and Version 1 of Ticket #7828, comment 33


Ignore:
Timestamp:
Jun 18, 2014 7:20:57 AM (5 years ago)
Author:
jstolarek
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7828, comment 33

    initial v1  
    1111> It would probably be necessary to force the replacements for the arrow combinators to be polymorphic in the environment.
    1212
    13 This brings me to another question. So let's say the user rebinds `arr` to some function with the type `(Arrow a, Foo b) => a b b`. Then, after desugaring, `arr` is made to operate on data + environment, like in your definition of `bind`: `arr (\ ((e,s),b) -> (e,(b,s)))`. So the type that `arr` operates on may no longer be an instance of `Foo`. What happens? I don't see a way out.
     13This brings me to another question. So let's say the user rebinds `arr` to some function with the type `(Arrow a, Foo b) => (b -> c) -> a b c`. Then, after desugaring, `arr` is made to operate on data + environment, like in your definition of `bind`: `arr (\ ((e,s),b) -> (e,(b,s)))`. So the type `b` that `arr` has in its signature may no longer be an instance of `Foo`. What now? I don't see a way out.
    1414
    1515> Question: would it be possible as part of this refactoring to have a sort of generalized (weaker) arrow that doesn't have arr?