Skip to content

Commit ac4217b

Browse files
committed
add test for module type with
<!-- ps-id: c4f408bb-cab8-4ea2-8486-702917493cfd -->
1 parent bdcee74 commit ac4217b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src_test/ppx_deriving/test_ppx_import.ml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ type package_type =
5454

5555
module type Hashable = [%import: (module Hashtbl.HashedType)]
5656

57+
module type HashableWith = [%import:
58+
(module Hashtbl.HashedType with type t = string)]
59+
60+
module HashableWith : HashableWith = struct
61+
type t
62+
63+
let equal = String.equal
64+
let hash = int_of_string
65+
end
66+
5767
[%%import: type self_t = Test_self_import.t]
5868

5969
let test_self_import _ctxt =

0 commit comments

Comments
 (0)