MonoLocalBinds and darcs
marlowsd at gmail.com
Tue Nov 2 08:21:21 EDT 2010
On 02/11/2010 07:37, Sittampalam, Ganesh wrote:
> I've just been updating darcs 2.5 for GHC 7.0. I had to add about 40
> signatures for MonoLocalBinds in about 140 files/30K LOC. Is that about
> normal? darcs does make fairly heavy use of rank 2 polymorphism which
> leads to quite a lot of local definitions needing to be polymorphic.
Sounds about right given my experience so far, but as you say it depends
a lot on the style of code involved. Some people tend to write a lot
more polymorphic local bindings than others :-)
> Also, NoMonoLocalBinds didn't help at all, which surprised me a bit - I
> thought it might at least make some of the signatures unnecessary.
I suspect MonoLocalBinds is being turned on again by an option later in
the ordering. I had this problem a lot when trying to use
NoMonoLocalBinds, it's actually quite hard to make it stick. e.g. if you
have LANGUAGE GADTs in the source file, that will override
NoMonoLocalBinds on the command line. I'm not sure what (if anything)
we should do about this.
> Finally, is NoMonoLocalBinds supposed to imply NPlusKPatterns? The only
> changes I was able to revert when I enabled it were a couple of those!
It certainly is not, if you have evidence to the contrary please submit
a bug report.
> Please access the attached hyperlink for an important electronic communications disclaimer:
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
More information about the Glasgow-haskell-users