<div dir="ltr">[Adding <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a> to cc]</div><div class="gmail_extra"><br><div class="gmail_quote">On 21 May 2015 at 02:12, Sergei Meshveliani <span dir="ltr"><<a href="mailto:mechvel@botik.ru" target="_blank">mechvel@botik.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Now, I delete `OverlappingInstances' from docon.cabal<br>
<br>
and also from the $doconCpOpt options to call ghc on<br>
demotest/Main.hs.<br>
<br>
And now the test runs correct in ghc-7.10.1 !<br>
<br>
Only it is 1.5 times slower than in ghc-7.8.2.<br>
So:<br>
a) The test intends overlapping instances,<br>
b) instance overlaps are not declared for ghc-7.10.1,<br>
c) this leads to a correct running, but 1.5 times slower.<br>
<br>
I do not know of whether this slow down is due to the removed pragma or<br>
due to other features of ghc-7.10.1.<br>
<br>
And there remains my question about how GHC could help to recall the<br>
overlapping instance pairs.<br>
<br>
Regards,<br>
<br>
------<br>
Sergei<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On Wed, 2015-05-20 at 23:52 +0400, Sergei Meshveliani wrote:<br>
> Dear GHC developers,<br>
><br>
> Please, test ghc-7.10.1 on making docon-2.12<br>
><br>
> <a href="http://www.botik.ru/pub/local/Mechveliani/docon/" target="_blank">http://www.botik.ru/pub/local/Mechveliani/docon/</a><br>
><br>
> and running its demotest/Main<br>
> (see install.txt).<br>
><br>
><br>
> docon-2.12 has been tested under ghc-7.8.2,<br>
><br>
> and it has<br>
> extensions: ... OverlappingInstances<br>
> in docon.cabal.<br>
><br>
> Making with ghc-7.10.1 issues a warning and advises to set the related<br>
> pragma individually to each corresponding instance.<br>
><br>
><br>
> (1) First, I ignored this warning, and surprisingly, the library has<br>
> been made.<br>
><br>
> In the build/ subdirectory there are .hi and .o files,<br>
> and there have newly appeared the "dyn" files:<br>
><br>
> Matr0_.dyn_hi Matr0_.dyn_o Matr0_.hi Matr0_.o ...<br>
><br>
> (I do not know what does it mean "dyn").<br>
><br>
> Then,<br>
> > make install<br>
> reports<br>
><br>
> runghc Setup.hs install --user<br>
> Installing library in<br>
> /home/mechvel/docon/2.12/docon/source/inst/lib/x86_64-linux-ghc-7.10.1/docon_99cUeE74HI58Sb9XilYAZ2<br>
><br>
> Registering docon-2.12.1...<br>
><br>
> Instead of the .a file, ls shows there<br>
><br>
> docon_99cUeE74HI58Sb9XilYAZ2 docon_JzkSttB1MsX3R5AQ1eIgvC<br>
><br>
> Are these names intended?<br>
><br>
> Then I command<br>
><br>
> > cd demotest<br>
> > ghc $doconCpOpt -O -rtsopts --make Main<br>
> > ./Main<br>
><br>
> It is built and runs. But breaks in the middle with a certain reasonable<br>
> DoCon error message.<br>
><br>
> The DoCon design is so that choosing a different instance among the<br>
> overlapping ones may change the algorithm, and the computation cost, but<br>
> still must produce the same result. It must -- unless DoCon has a bug in<br>
> some of these instances.<br>
><br>
><br>
> (2) All right, I need to set {-# OVERLAPPABLE #-} individually to each<br>
> instance which may overlap with some other instance in DoCon.<br>
><br>
> There is declared a great number of instances. And it occurs difficult<br>
> for me to recall now: which instance does overlap with something and<br>
> which does not<br>
> (at least they all worked correct in ghc-7.8.2).<br>
><br>
> Well, I can set {-# OVERLAPPABLE #-} to _each_ instance.<br>
> But such a program does not look nice.<br>
><br>
> And I would like to be more definite and to set {-# OVERLAPPING #-} to<br>
> all appropriate places.<br>
> Suppose that I forget that some instance overlaps with something and<br>
> skipped this pragma. The above test shows that this can lead to a wrong<br>
> program to run<br>
> (is this feature intended?).<br>
><br>
> And what will be the consequence if {-# OVERLAPPING #-} is set to an<br>
> instance which does not overlap with anything?<br>
><br>
> Can the compiler help to list the overlaps?<br>
><br>
> Please, advise,<br>
><br>
> ------<br>
> Sergei<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Glasgow-haskell-users mailing list<br>
> <a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</a><br>
><br>
<br>
<br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Regards</div><div dir="ltr"><div><br></div><div>Sumit Sahrawat</div></div></div></div></div></div></div>
</div>