Ported (interval) to haskell