Skip to content
  • Sylvain Henry's avatar
    f9f9f030
    Arrows: correctly query arrow methods (#17423) · f9f9f030
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    Consider the following code:
    
        proc (C x y) -> ...
    
    Before this patch, the evidence binding for the Arrow dictionary was
    attached to the C pattern:
    
        proc (C x y) { $dArrow = ... } -> ...
    
    But then when we desugar this, we use arrow operations ("arr", ">>>"...)
    specialised for this arrow:
    
        let
            arr_xy = arr $dArrow -- <-- Not in scope!
            ...
        in
            arr_xy (\(C x y) { $dArrow = ... } -> ...)
    
    This patch allows arrow operations to be type-checked before the proc
    itself, avoiding this issue.
    
    Fix #17423
    f9f9f030
    Arrows: correctly query arrow methods (#17423)
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    Consider the following code:
    
        proc (C x y) -> ...
    
    Before this patch, the evidence binding for the Arrow dictionary was
    attached to the C pattern:
    
        proc (C x y) { $dArrow = ... } -> ...
    
    But then when we desugar this, we use arrow operations ("arr", ">>>"...)
    specialised for this arrow:
    
        let
            arr_xy = arr $dArrow -- <-- Not in scope!
            ...
        in
            arr_xy (\(C x y) { $dArrow = ... } -> ...)
    
    This patch allows arrow operations to be type-checked before the proc
    itself, avoiding this issue.
    
    Fix #17423
Loading