I got an error applying the function below to an ''int''

module type HAS_DOUBLE = sig

  type t
  val double: t -> t
end ;;
  
    
module MyInt : HAS_DOUBLE = struct

  type t = int
  let double x = 2 * x
end ;;

MyInt.double 5 ;;
             _

Error: This expression has type int but an expression was expected of type
         MyInt.t

Tested under v. 3.11.2 and 3.12

Any suggestion ?

Thanks, 
Gabriel

-- 
You received this message because you are subscribed to the Google Groups 
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html

Reply via email to