Personally I put all the flags in each file. That way I can know what features I'm needing at each use-site. Most of my files have only 1-2 flags. Others have 30. 

It is important to me to know where I'm leaning on things like FlexibleInstances that can make inference for users worse if I don't do so carefully.

It also lets me load up individual modules as I'm working from ghci directly rather than rebuild the entire package.

This is, of course, a matter of style, so tastes vary.

-Edward


On Tue, Jul 15, 2014 at 2:34 PM, Bardur Arantsson <spam@scientician.net> wrote:
On 2014-07-15 19:30, Michael Orlitzky wrote:
> On 07/14/2014 11:23 PM, Andrew Gibiansky wrote:
>> Hey all,
>>
>> I would like to propose a very minor flag to add to GHC. I would like
>> GHC to have a --with-prelude flag, which would specify an alternate
>> Prelude to use instead of the default Haskell prelude.
>>
>> This would have an effect similar to -XNoImplicitPrelude and an additional
>>
>> import MyNewPrelude
>>
>> in the source file. It might be a /little/ different semantically, as a
>> qualified import would disable the original implicit import, just like
>> it does with the default Haskell prelude.
>>
>
[--snip--]
>
> We went down this road once before with -fglasgow-exts. Eventually, we
> all realized it was much better to place the required extensions in
> pragmas at the top of the file.
>

Except "we" don't :). "We" use flags in the .cabal file. Or, at least I
do. Explicitness certainly sometimes has great value, but not always.

Regards,

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe