Extensions and Cabal
Stefan O'Rear
stefanor at cox.net
Sat Mar 24 19:14:24 EDT 2007
On Sat, Mar 24, 2007 at 10:53:54PM +0000, Samuel Bronson wrote:
> Ian Lynagh <igloo <at> earth.li> writes:
>
> > Thus I propose that the .cabal file actually specifies what extensions
> > the modules are /allowed/ to use, but does not actually enable them.
> > They would then be enabled by LANGUAGE pragmas in the modules as
> > necessary. So, if the .cabal file says "Extensions: E, F" then the
> > modules will be compiled with
> > --no-extension-flags --allowed-extension=E,F
> > and if a module has "{-# LANGUAGE E #-}" then only extension E would be
> > enabled for that module. If a module has "{-# LANGUAGE E,G #-}" then
> > compilation would fail as extension G is not permitted.
> >
> > Any comments? Criticisms? Flames?
>
> The only thing I can think of (besides "nice idea") is that you'd better either
> a) make sure that Cabal always knows about all the extensions supported by the
> compiler
> or
> b) provide a workaround for when Cabal does not know about a given extension.
We already have this, it's called darcs send.
That said, cabal is very sorely lacking hacker's documentation. I for
one can't understand the code. (yet (but still I learned lambdabot
faster))
Stefan
More information about the cabal-devel
mailing list