type int_unit
= Int
of int | Unit
of unit;; type everything = Int_Unit of int_unit | Str_Float of str_float;;
let f x =
match x with
Int a -> "int"
| Float a -> "float"
| Unit a -> "unit"
dHlwZSBpbnRfdW5pdCA9IEludCBvZiBpbnQgfCBVbml0IG9mIHVuaXQ7Owp0eXBlIHN0cl9mbG9hdCA9IFN0cmluZyBvZiBzdHJpbmcgfCBGbG9hdCBvZiBmbG9hdDs7CnR5cGUgZXZlcnl0aGluZyA9IEludF9Vbml0IG9mIGludF91bml0IHwgU3RyX0Zsb2F0IG9mIHN0cl9mbG9hdDs7CgpsZXQgZiB4ID0KICBtYXRjaCB4IHdpdGgKICAgIEludCBhIC0+ICJpbnQiCiAgfCBGbG9hdCBhIC0+ICJmbG9hdCIKICB8IFVuaXQgYSAtPiAidW5pdCIKICB8IFN0cmluZyBhIC0+ICJzdHJpbmciOzs=
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