[Adding ghc-devs@haskell.org to cc]

On 21 May 2015 at 02:12, Sergei Meshveliani <mechvel@botik.ru> wrote:
Now, I delete  `OverlappingInstances'  from  docon.cabal

and also from the   $doconCpOpt  options to call  ghc  on
demotest/Main.hs.

And now the test runs correct in ghc-7.10.1 !

Only it is 1.5 times slower than in  ghc-7.8.2.
So:
a) The test intends overlapping instances,
b) instance overlaps are not declared for  ghc-7.10.1,
c) this leads to a correct running, but 1.5 times slower.

I do not know of whether this slow down is due to the removed pragma or
due to other features of  ghc-7.10.1.

And there remains my question about how GHC could help to recall the
overlapping instance pairs.

Regards,

------
Sergei




On Wed, 2015-05-20 at 23:52 +0400, Sergei Meshveliani wrote:
> Dear GHC developers,
>
> Please, test  ghc-7.10.1  on making  docon-2.12
>
>   http://www.botik.ru/pub/local/Mechveliani/docon/
>
> and running its    demotest/Main
> (see install.txt).
>
>
> docon-2.12  has been tested under  ghc-7.8.2,
>
> and it has
>                  extensions: ... OverlappingInstances
> in  docon.cabal.
>
> Making with  ghc-7.10.1  issues a warning and advises to set the related
> pragma individually to each corresponding instance.
>
>
> (1) First, I ignored this warning, and surprisingly, the library has
> been made.
>
> In the  build/  subdirectory there are  .hi and .o  files,
> and there have newly appeared the  "dyn" files:
>
>   Matr0_.dyn_hi Matr0_.dyn_o Matr0_.hi Matr0_.o  ...
>
> (I do not know what does it mean "dyn").
>
> Then,
>         > make install
> reports
>
>   runghc Setup.hs install --user
>   Installing library in
>   /home/mechvel/docon/2.12/docon/source/inst/lib/x86_64-linux-ghc-7.10.1/docon_99cUeE74HI58Sb9XilYAZ2
>
>   Registering docon-2.12.1...
>
> Instead of the  .a  file,  ls  shows there
>
>   docon_99cUeE74HI58Sb9XilYAZ2  docon_JzkSttB1MsX3R5AQ1eIgvC
>
> Are these names intended?
>
> Then I command
>
>   > cd demotest
>   > ghc $doconCpOpt -O -rtsopts --make Main
>   > ./Main
>
> It is built and runs. But breaks in the middle with a certain reasonable
> DoCon error message.
>
> The DoCon design is so that choosing a different instance among the
> overlapping ones may change the algorithm, and the computation cost, but
> still must produce the same result. It must -- unless DoCon has a bug in
> some of these instances.
>
>
> (2) All right, I need to set  {-# OVERLAPPABLE #-}  individually to each
> instance which may overlap with some other instance in DoCon.
>
> There is declared a great number of instances. And it occurs difficult
> for me to recall now: which instance does overlap with something and
> which does not
> (at least they all worked correct in ghc-7.8.2).
>
> Well, I can set  {-# OVERLAPPABLE #-}  to _each_ instance.
> But such a program does not look nice.
>
> And I would like to be more definite and to set  {-# OVERLAPPING #-}  to
> all appropriate places.
> Suppose that I forget that some instance overlaps with something and
> skipped this pragma. The above test shows that this can lead to a wrong
> program to run
> (is this feature intended?).
>
> And what will be the consequence if  {-# OVERLAPPING #-}  is set to an
> instance which does not overlap with anything?
>
> Can the compiler help to list the overlaps?
>
> Please, advise,
>
> ------
> Sergei
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users



--
Regards

Sumit Sahrawat