Types and effects for Resouce Usage Analysis