Iterator Variable Not In Scope Haskell