You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a function accepts multiple implicit arguments and their types nest as type parameters, the later implicit argument is not resolved. This appears to be an actual failure rather than a printing error: see the last evaluation.
$ rlwrap boot/ocamlrun ./ocaml -nostdlib -I stdlib -noinit
OCaml version 4.02.1+dev0-2014-08-29#moduletypeTYPE1=sigtype _ t end;;
module type TYPE1=sigtype _ t end#letf{M : TYPE1}{N : TYPE1} (x: int M.t N.t M.t) = x;;
valf : {M : TYPE1} -> {N : TYPE1} -> intM.tN.tM.t -> intM.tN.tM.t=<fun>#implicitmoduleOption_type=structtype 'a t = 'a optionend;;
implicit moduleOption_type : sigtype 'a t = 'a optionend# f {Option_type} {Option_type};;
- : intOption_type.t N.t Option_type.t ->
intOption_type.t N.t Option_type.t
=<fun>#letgx= f x;;
valg :
intOption_type.tN.tOption_type.t -> intOption_type.tN.tOption_type.t=<fun>#g (Some (Some (Some15)));;
Error: Thisexpressionhastype 'a option
but an expression was expected of typeintOption_type.t N.t
The text was updated successfully, but these errors were encountered:
module type Mk=sigtype 'a t valmk : 'a -> 'atendmodule type T=sigtype t endmoduleLst=structtype 'a t = 'a listletmkx= [x] endlettest{M : Mk}{T : T} (f: T.t) : T.t M.t =M.mk f
let test2 = test {Lst} {Int64} 0L
When a function accepts multiple implicit arguments and their types nest as type parameters, the later implicit argument is not resolved. This appears to be an actual failure rather than a printing error: see the last evaluation.
The text was updated successfully, but these errors were encountered: