Deriving Effect Handler Semantics