Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ppx/ppx_eliom_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let pat_args = function [] -> punit () | [p] -> p | l -> Pat.tuple l
These bits are encoded using an OCaml-compatible variant of Base
64, as the hash is used to generate OCaml identifiers. *)
let file_hash loc =
let s = Digest.string loc.Location.loc_start.pos_fname in
let s = Filename.basename loc.Location.loc_start.pos_fname in
let e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_'" in
let o = Bytes.create 6 in
let g p = Char.code s.[p] in
Expand Down Expand Up @@ -283,7 +283,7 @@ module Cmo = struct
; ev_kind = Event_after ty
; _ } ->
if pos_cnum' = pos_cnum + 1
then Hashtbl.add events (pos_fname, pos_cnum) ty
then Hashtbl.add events (Filename.basename pos_fname, pos_cnum) ty
| _ -> ())
evl

Expand Down Expand Up @@ -459,7 +459,7 @@ module Cmo = struct

let find err loc =
let {Lexing.pos_fname; pos_cnum; _} = loc.Location.loc_start in
try typ (Hashtbl.find (Lazy.force events) (pos_fname, pos_cnum))
try typ (Hashtbl.find (Lazy.force events) (Filename.basename pos_fname, pos_cnum))
with Not_found ->
Typ.extension ~loc @@ Location.Error.to_extension
@@ Location.Error.make ~loc ~sub:[]
Expand Down