Skip to content

Commit

Permalink
extend ocaml-ppx#196 and add a CHANGELOG entry
Browse files Browse the repository at this point in the history
  • Loading branch information
gasche committed Jul 6, 2019
1 parent fe9ab34 commit 0a4aecd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog
NEXT RELEASE
------------

* workaround Location.input_filename being empty
when using reason-language-server
#196
(Ryan Artecona)
* Restore support for OCaml 4.02.3
#188
(ELLIOTTCABLE)
Expand Down
8 changes: 7 additions & 1 deletion src/api/ppx_deriving.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,13 @@ let module_from_input_name () =
#else
String.capitalize
#endif
in [capitalize (Filename.(basename (chop_suffix filename ".ml")))]
in
match Filename.chop_suffix filename ".ml" with
| exception _ ->
(* see https://github.com/ocaml-ppx/ppx_deriving/pull/196 *)
[]
| path ->
[capitalize (Filename.basename path)]

let pstr_desc_rec_flag pstr =
match pstr with
Expand Down

0 comments on commit 0a4aecd

Please sign in to comment.