annotate tests/newMessage.ur @ 1906:0d2fdc2cc46c

Allow building in a separate build directory Signed-off-by: Anders Kaseorg <andersk@mit.edu> --- Makefile.am | 30 +++--- src/c/Makefile.am | 2 +- src/compiler.mlb | 2 +- src/sources | 302 +++++++++++++++++++++++++++--------------------------- 4 files changed, 168 insertions(+), 168 deletions(-)
author Anders Kaseorg <andersk@mit.edu>
date Fri, 22 Nov 2013 09:36:14 -0500
parents 7ec8dab190a7
children
rev   line source
adam@1736 1 datatype message = NewQuestion of { Id : string}
adam@1736 2 | Something of {Blah : int}
adam@1736 3
adam@1736 4 fun showMessage (message : message) =
adam@1736 5 case message of
adam@1736 6 NewQuestion {Id = a} => a
adam@1736 7 | Something {Blah = x} => "blah"
adam@1736 8
adam@1736 9 val show_mes = mkShow showMessage
adam@1736 10
adam@1736 11 fun showTwoTuple [a] [b] (_ : show a) (_: show b) = mkShow (fn (two_tuple : {1:a, 2:b}) =>
adam@1736 12 "(" ^ show two_tuple.1 ^ ", " ^ show two_tuple.2 ^ ")"
adam@1736 13
adam@1736 14 )
adam@1736 15 val om = show (Something {Blah = 1}, Something {Blah = 2})