polymorphic-functions

OCaml pattern matching on builtin types

I'm trying to write a polymorphic function, which needs to do something slightly different depending on the type of the parameter. Is there any way that I can do a pattern match on the type of the object, using the builtin types? I'm thinking of something along these lines: let to_string v = match v with | string -> v | in...