an algebraic Effect in Idris for concurrent resource management