(module rc_app_let_partial_drop_leak (data Wrap (ctor MkWrap (con Int))) (data Cell (ctor MkCell (con Wrap) (con Wrap))) (data Pair (ctor MkPair (con Cell) (con Cell))) (fn build_pair (type (fn-type (params (con Int)) (ret (own (con Pair))))) (params n) (body (term-ctor Pair MkPair (term-ctor Cell MkCell (term-ctor Wrap MkWrap n) (term-ctor Wrap MkWrap 2)) (term-ctor Cell MkCell (term-ctor Wrap MkWrap 3) (term-ctor Wrap MkWrap 4))))) (fn use_cell (suppress (code "over-strict-mode") (because "RC codegen test: shape used to feed App-bound let-close partial-drop into use_cell")) (type (fn-type (params (own (con Cell))) (ret (con Int)))) (params c) (body (match c (case (pat-ctor MkCell w1 w2) 1)))) (fn main (type (fn-type (params) (ret (con Unit)) (effects IO))) (params) (body (let p (app build_pair 1) (app print (match p (case (pat-ctor MkPair a _) (app use_cell a))))))))