Bash Script Variable Not In Scope Haskell