Setup.(l)hs
Posted on 6 December 2007
One minor annoyance when using Cabal to install stuff is that not every project agrees on whether the Setup script should be an .hs or an .lhs file. The consequence is that when doing a bunch of installations, I'll hit the up arrow to re-run, say,
runhaskell Setup.lhs configure and it will complain that the file is not found, because this project uses .hs and the project just before uses .lhs.
What I'm wondering, though is if it would be a good idea for projects to distribute
both files? We could even use something like this to have the same file regardless of extension:
#!/usr/bin/env runhaskell
{-
> import Distribution.Simple
> main = defaultMain
-}
import Distribution.Simple
main = defaultMain
I guess that once cabal-install comes out, none of this would really matter since all that building-of-dependencies stuff would be taken care of automatically.