[Haskell-beginners] Cross-platform .hs files on Linux and Windows

Henk-Jan van Tuyl hjgtuyl at chello.nl
Tue Apr 17 18:23:08 CEST 2012


On Tue, 17 Apr 2012 13:06:45 +0200, Vinay Sajip <vinay_sajip at yahoo.co.uk>  
wrote:

> I'm not saying runhaskell needs to do anything more than skip a shebang  
> line, on
> Windows, if it sees one. Otherwise, you can't have cross-platform  
> scripts on
> Windows and Linux.


On my Windows XP system, the shebang line is ignored:

HashBang.hs:
----✁---------
#!/usr/bin/env runhaskell

main = print "Hello!"
----✃---------

> runhaskell HashBang.hs
"Hello!"

> which runhaskell.exe
C:\Program Files\Haskell Platform\2011.4.0.0\bin\runhaskell.exe

Regards,
Henk-Jan van Tuyl


-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--



More information about the Beginners mailing list