Mercurial > urweb
view tests/newMessage.ur @ 1924:b44138e6a3bf
Add activeHead tag.
activeHead is similar to active but produces xhead instead of xbody
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Fri, 06 Dec 2013 13:59:39 +0400 |
parents | 7ec8dab190a7 |
children |
line wrap: on
line source
datatype message = NewQuestion of { Id : string} | Something of {Blah : int} fun showMessage (message : message) = case message of NewQuestion {Id = a} => a | Something {Blah = x} => "blah" val show_mes = mkShow showMessage fun showTwoTuple [a] [b] (_ : show a) (_: show b) = mkShow (fn (two_tuple : {1:a, 2:b}) => "(" ^ show two_tuple.1 ^ ", " ^ show two_tuple.2 ^ ")" ) val om = show (Something {Blah = 1}, Something {Blah = 2})