class Show a where
show :: a -> String
instance Show Int where
show = ... -- provided by default
show 1
module type SHOW = sig
type t
val show : t -> string
end
module ShowInt = struct
type t = int
let show = string_of_int
end
ShowInt.show 1