(module poly_apply
  (fn apply
    (type (forall (vars a b) (fn-type (params (own (fn-type (params (own a)) (ret (own b)))) (own a)) (ret (own b)))))
    (params f x)
    (body (app f x)))
  (fn succ
    (type (fn-type (params (own (con Int))) (ret (own (con Int)))))
    (params n)
    (body (app + n 1)))
  (fn main
    (type (fn-type (params) (ret (own (con Unit))) (effects IO)))
    (params)
    (body (app print (app apply succ 41)))))
