
On Mon, 2008-06-16 at 07:38 +0200, Johannes Waldmann wrote:
Does this mean that literate source files should be discouraged? They seem to be fairly common, especially in conjunction with Cabal (i.e., Setup.lhs).
I think the reason for having Setup.lhs instead of Setup.hs is that you can put #!/usr/local/bin/runhaskell in their first line. Then chmod +x Setup.lhs and you can do ./Setup.lhs configure etc. So, this has nothing to do with literate programming.
And it's really more trouble than it's worth, IMHO. runghc Setup is the better recommendation I think because it works for .hs or .lhs and it works on operating systems with no concept of #! or chmod. So with that the recommendation then the simplest possible Setup script is: Setup.hs: import Distribution.Simple main = defaultMain Duncan