{- Variant types -} new c : ^[num>Int text>String] run c ?* msg = switch msg of ( num> v : Int -> printi! (+ v 1) text> s : String -> print! (+$ "message: " s) ) run c! [num> 2] run c! [text> "foo"]