This feature adjusts the position that [%call_pos] uses. The motivation is |>:
(* f : here:[%call_pos] -> unit -> unit *)
() |> f |> f
Previously, both calls to f received the same position for ~here! Both positions were the start of ().
This is because the AST of the expression is roughly ((() |> f) |> f) and since call_pos uses the location of the entire function application, both calls to f had the same starting location (despite having different ending locations.)
This is change in this commit by making [%call_pos] use the start position of the function instead of the start position of the entire application.
This feature adjusts the position that
[%call_pos]
uses. The motivation is|>
:Previously, both calls to
f
received the same position for~here
! Both positions were the start of()
.This is because the AST of the expression is roughly
((() |> f) |> f)
and since call_pos uses the location of the entire function application, both calls tof
had the same starting location (despite having different ending locations.)This is change in this commit by making
[%call_pos]
use the start position of the function instead of the start position of the entire application.