An Effect System for Algebraic Effects and Handlers (Logical Methods in Computer Science, 2014)