adamc@834: fun exec [m ::: Type -> Type] (_ : monad m) [ts ::: {Type}] r (fd : folder ts) = adamc@834: foldR [m] [fn ts => m $ts] adamc@834: (fn [nm :: Name] [v :: Type] [rest :: {Type}] [[nm] ~ rest] action acc => adamc@834: this <- action; adamc@834: others <- acc; adamc@834: return ({nm = this} ++ others)) adamc@834: (return {}) [ts] fd r