Simple discrete event simulator in Haskell