adam@1736: datatype message = NewQuestion of { Id : string} adam@1736: | Something of {Blah : int} adam@1736: adam@1736: fun showMessage (message : message) = adam@1736: case message of adam@1736: NewQuestion {Id = a} => a adam@1736: | Something {Blah = x} => "blah" adam@1736: adam@1736: val show_mes = mkShow showMessage adam@1736: adam@1736: fun showTwoTuple [a] [b] (_ : show a) (_: show b) = mkShow (fn (two_tuple : {1:a, 2:b}) => adam@1736: "(" ^ show two_tuple.1 ^ ", " ^ show two_tuple.2 ^ ")" adam@1736: adam@1736: ) adam@1736: val om = show (Something {Blah = 1}, Something {Blah = 2})