Skip to content
Browse files

Remove leading path components from the generated module prefix for t…

…ype aliases.

Otherwise 'atdgen -b path/file.atd' will generate syntactically incorrect
aliases of the form 'type t = Path/file_t.t' in path/file_b.{mli,ml}
  • Loading branch information...
1 parent ed176ec commit a349c64c7177a9abd354bf193623a46fe0118907 @pmundkur committed Aug 17, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 ag_main.ml
View
3 ag_main.ml
@@ -306,7 +306,8 @@ Recommended usage: %s (-t|-b|-j|-v|-dep|-list) example.atd" Sys.argv.(0) in
Some _ as x -> x
| None ->
(match mode with
- `B | `J | `V -> Some (String.capitalize base ^ "_t")
+ `B | `J | `V ->
+ Some (String.capitalize (Filename.basename base) ^ "_t")
| _ -> None
)
in

0 comments on commit a349c64

Please sign in to comment.
Something went wrong with that request. Please try again.