Hi Sergei,

I think you should use {-# OVERLAPPABLE #-}: see the description here https://ghc.haskell.org/trac/ghc/ticket/9242#comment:16 which is probably in the manual somewhere too.

Regards,
Adam

On Thu, May 21, 2015 at 9:40 AM, Sergei Meshveliani <mechvel@botik.ru> wrote:
People,

I wrote recently about finding places to set {-# OVERLAPPING #-}
when porting an application from 7.8.2 to 7.10.1.

I am doing this for porting  docon-2.12  from 7.8.2 to 7.10.1.

And  ghc-7.10.1  indeed helped me to find several places to set this
pragma (instead of using the total key -XOverlappingInstances).

Finally, it has come to this module:

---------------------------------------------
Preprocessing library docon-2.12.1...
[48 of 86] Compiling ResRing__  ( ResRing__.hs, dist/build/ResRing__.o )

ResRing__.hs:183:31:
    Overlapping instances for Eq (Maybe PropValue)
      arising from a use of ‘/=’
    Matching instances:
      instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’
      instance (Residue r, Eq a) => Eq (r a) -- Defined in ‘ResEuc0_’
    In the expression: lookup IsGxBasis ps /= Just Yes
    ...
----------------------------------------------

As before, I set
   instance {-# OVERLAPPING #-} (Residue r, Eq a) => Eq (r a)  where
            ...

in  ResEuc0_.hs.

But this does not help, the compiler continues with the same report.

I see the difference to previous porting process in that one of the
overlapping instances is of the GHC library, so that I cannot set the
needed overlap pragma for it.

On the other hand, ghc-7.8.2 compiled docon-2.12 successfully.

What my be a way out?

Thanks,

------
Sergei


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