fork download
  1. type int_unit = Int of int | Unit of unit;;
  2. type str_float = String of string | Float of float;;
  3. type everything = Int_Unit of int_unit | Str_Float of str_float;;
  4.  
  5. let f x =
  6. match x with
  7. Int a -> "int"
  8. | Float a -> "float"
  9. | Unit a -> "unit"
  10. | String a -> "string";;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
File "prog.ml", line 8, characters 4-11:
This pattern matches values of type str_float
but is here used to match values of type int_unit
stdout
Standard output is empty