[Haskell-beginners] Using stack inside a function without declaring it as input