module type S
module M : sig
val f : {X:S} -> int -> int
implicit module M {X:S} : S
end =
struct
let rec f : {X:S} -> int -> int
= fun {X:S} y -> f {X} y
implicit module M {X:S} = X
end
-dsource output before:
module type S = sig end;;
module M :
sig val f : (implicit X : S) -> int -> int implicit functor M : (X : S) S
end =
struct
module N = struct end
let rec f: (implicit X : S) -> int -> int =
fun (implicit X : (X : S)) -> fun y -> f (implicit N) y
implicit functor M (X : S) = X
end ;;
-dsource output after:
module type S
module M :
sig val f : {X : S} -> int -> int implicit module M {X : S} : S end =
struct
let rec f: {X : S} -> int -> int =
fun {X : (X : S)} -> fun y -> f {X} y
implicit module M {X : S} = X
end
Note: this doesn't fix issue #7, so the implicit argument syntax is still invalid.
Test input:
-dsource
output before:-dsource
output after:Note: this doesn't fix issue #7, so the implicit argument syntax is still invalid.