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

Daniel Fischer daniel.is.fischer at googlemail.com
Thu Apr 19 15:42:20 CEST 2012


On Wednesday 18 April 2012, 15:16:52, Vinay Sajip wrote:
> Henk-Jan van Tuyl <hjgtuyl <at> chello.nl> writes:
> > I've already tried that; if I use Notepad to convert the file to
> > UTF-8, GHC does not accept the shebang.

That's by design. GHC treats a shebang line as a comment *if the shebang is 
the very first bytes of the file*.
With a BOM, the shebang isn't the start of the file, so it's not treated as 
a comment.

You might change the ticket to a feature request.



More information about the Beginners mailing list