Module Ppx_let_expander.With_location

type t =
  1. | No_location
  2. | Location_of_callsite
  3. | Location_in_scope of string

With_location.t specifies whether or not ppx_let should provide a "location" ~here parameter. e.g. taking as an example the made up let%foo PAT = EXPR in BODY.

  • No_location will just call foo EXPR ~f:(fun PAT -> BODY)
  • Location_of_callsite will call foo ~here:[%here] EXPR ~f:(fun PAT -> BODY)
  • Location_in_scope "there" will call foo ~here:there EXPR ~f:(fun PAT -> BODY)