only one argument is allowed after the #! on the first line. however the following should be portable if you must set the variable before runhaskell is executed: #!/bin/sh -- > /dev/null 2>&1; MYENV=foo runhaskell $_ import System.Environment main = getEnv "MYENV" >>= print -- John Meacham - ⑆repetae.net⑆john⑈