Extensions and Cabal
Samuel Bronson
naesten at gmail.com
Sat Mar 24 18:53:54 EDT 2007
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.
More information about the cabal-devel
mailing list