Skip to content

Remove Setup.hs, use Setup.lhs only #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bos opened this issue May 24, 2012 · 3 comments
Closed

Remove Setup.hs, use Setup.lhs only #92

bos opened this issue May 24, 2012 · 3 comments

Comments

@bos
Copy link
Contributor

bos commented May 24, 2012

(Imported from Trac #100, reported by @igloo on 2006-11-21)

I'm not sure if this should be a bug(enhancement) report or on the mailing list, but I've gone with putting it here so that it won't be accidentally forgotten about.

Allowing both Setup.hs and Setup.lhs causes minor annoyances all over the place when working with cabal packages, and moreso when writing tools to work with cabal packages.

There are also a couple of larger problems I've had. For example, when writing a Makefile that builds all cabal packages in subdirectories (i.e. (re)make setup if necessary, configure and build) it is hard (for me at least!) to tell make "setup depends on whichever of Setup.hs and Setup.lhs exists".

The benefits of allowing Setup.hs are small. For the common case you only save a couple of copies of > , while for larger Setup.lhs files \begin{code} and \end{code} at the start and end is not significant overhead.

The reason for choosing to keep Setup.lhs over Setup.hs is so that we can use #! scripts etc without having to worry about the Haskell impl trying to parse it.

Thus I would like to propose dropping support for Setup.hs and supporting Setup.lhs only. It would probably be necessary for cabal to complain if it finds a Setup.hs file, as otherwise people wouldn't notice they hadn't updated their packages.

Thanks
Ian

@ghost ghost assigned SyntaxPolice May 24, 2012
@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by @dcoutts on 2006-11-21)

The only way to enforce this is to get hackage to reject new packages that use the wrong one since we cannot reject existing packages. At the same time we'd want to require packages specify the build-type field.

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by guest on 2007-12-17)

In the future we'll be using the cabal command rather than running Setup directly, right? So maybe this ticket should just be closed.

Ian

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by @dcoutts on 2007-12-17)

Replying to guest:

In the future we'll be using the cabal command rather than running Setup directly, right? So maybe this ticket should just be closed.

Yes. Remember it's also possible to use runghc Setup without specifying any .hs or .lhs extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants