(module embed_export_record_ok
  (data State
    (ctor State (con Float) (con Int)))
  (fn step
    (export "step")
    (type
      (fn-type
        (params (own (con State)) (own (con Float)))
        (ret (own (con State)))))
    (params st sample)
    (body
      (match st
        (case (pat-ctor State acc n)
          (term-ctor State State (app + acc sample) (app + n 1)))))))
