"#!..." (Re[2]: cabal configure screw-up)

Ross Paterson ross at soi.city.ac.uk
Thu Aug 25 11:17:48 EDT 2005

On Thu, Aug 25, 2005 at 12:03:25PM +0400, Bulat Ziganshin wrote:
> Thursday, August 25, 2005, 7:37:39 AM, Frederik Eaton wrote:
> FE> I guess you could try to parse the "#!" line if MinGW is detected? ...
> FE> Anyway, it would seem that support for running "#!" scripts from
> FE> Haskell is a problem which is much more general than Cabal and should
> FE> be solved more centrally, like in the standard libraries.
> i strongly agree. ignoring of first line if it starts from "#" must
> be added to all Haskell realizations

I think Frederik is suggesting that under Windows, System.Cmd.rawSystem
and friends should examine the start of the file it is asked to execute,
looking for #! and then try to simulate Unix behaviour.  That might help
some things, but it won't always work, so may not be worth it.

Haskell implementations already ignore lines starting with # if the file
is a literate script.

More information about the Libraries mailing list