darcs patch: add hashbang header to Setup.hs

Thu Mar 15 15:57:23 CET 2007 Ketil Malde

Ketil Malde wrote:
Thu Mar 15 15:57:23 CET 2007 Ketil Malde
* add hashbang header to Setup.hs
Oops, i didn't realize 'darcs send' would bother the list with such trivialities. Anyway - the point is that I chmod +x'ed Setup.hs, and tried to run it. Since the system didn't know better, it used the default shell, and 'import' is part of ImageMagick, and tries to grab an X window and dump it contents to a file (in this case, a file named 'Distribution.Simple'). This was a bit puzzling to me until I figured it out, and I recommend a #! header for the Setup.hs file, which takes care of that. All you library writers out there, please take notice! :-) -k

Hi Ketil, On Thu, Mar 15, 2007 at 03:57:31PM +0100, Ketil Malde wrote:
hunk ./Setup.hs 1 +#!/usr/bin/env runhaskell
Good plan, but this way makes the file syntactically invalid. Instead, we could bracket the file with #!/usr/bin/env runhaskell \begin{code} and \end{code} and rename it Setup.lhs, but I currently have some patches for building GHC with cabal that that might conflict with, so I'd prefer to wait (hopefully not too long!) before doing this. Thanks Ian
participants (2)
-
Ian Lynagh
-
Ketil Malde