(module new_counter_user_adt (data Counter (ctor MkCounter (con Int))) (fn new (type (fn-type (params (own (con Int))) (ret (own (con Counter))))) (params n) (body (term-ctor Counter MkCounter n))) (fn main (type (fn-type (params) (ret (own (con Unit))) (effects IO))) (params) (body (let c (new Counter 42) (do io/print_str "ok\n")))))