fork download
  1. (* This doesn't work *)
  2. module Bar : sig
  3. type t
  4. end = struct
  5. type t = int
  6. end
  7.  
  8. let d : Bar.t = 3
  9. let e : Bar.t = 5
  10. let f (x : int) (y : int) = x + y
  11. let () = print_int (f d e)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
File "prog.ml", line 8, characters 16-17:
Error: This expression has type int but an expression was expected of type
         Bar.t
stdout
Standard output is empty