Skip to content

bpk15 and bkp47 fail with -dunique-increment=-1

This happens on master.

Repro command:

cd testsuite/; make EXTRA_HC_OPTS='-dunique-increment=-1' TEST="bkp15 bkp47"

Result:

Compile failed (exit code 1) errors were:
[1 of 3] Processing p
  [1 of 1] Compiling A[sig]           ( p/A.hsig, nothing )
[2 of 3] Processing q
  [1 of 1] Compiling A[sig]           ( q/A.hsig, nothing )
[3 of 3] Processing r
  [1 of 2] Compiling A[sig]           ( r/A.hsig, nothing )

bkp47.bkp:10:9: error:
    • Class ‘C’ has conflicting definitions in the module
      and its hsig file
      Main module: class C a where
                     g :: a -> a
                     f :: a -> a
                     {-# MINIMAL f | g #-}
      Hsig file:  class C a where
                    f :: a -> a
                    g :: a -> a
                    {-# MINIMAL f #-}
      The methods do not match:
        The names ‘f’ and ‘g’ are different
        The names ‘g’ and ‘f’ are different
    • while merging the signatures from:
        • p[A=<A>]:A
        • q[A=<A>]:A
        • ...and the local signature for A

bkp47.bkp:10:9: error:
    • Class ‘C’ has conflicting definitions in the module
      and its hsig file
      Main module: class C a where
                     g :: a -> a
                     f :: a -> a
                     {-# MINIMAL f | g #-}
      Hsig file:  class C a where
                    f :: a -> a
                    g :: a -> a
                    {-# MINIMAL g #-}
      The methods do not match:
        The names ‘f’ and ‘g’ are different
        The names ‘g’ and ‘f’ are different
    • while merging the signatures from:
        • p[A=<A>]:A
        • q[A=<A>]:A
        • ...and the local signature for A
Compile failed (exit code 1) errors were:

bkp15.bkp:1:26: warning:
    -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
[1 of 5] Processing p
  [1 of 1] Compiling H[sig]           ( p/H.hsig, nothing )
[2 of 5] Processing q
  [1 of 1] Compiling H[sig]           ( q/H.hsig, nothing )
[3 of 5] Processing r
  [1 of 2] Compiling H[sig]           ( r/H.hsig, nothing )

bkp15.bkp:36:9: error:
    • Class ‘Bloop’ has conflicting definitions in the module
      and its hsig file
      Main module: class GHC.Classes.Eq a => Bloop a b | a -> b where
                     data family GMap a (v :: * -> *)
                     y :: a -> a -> GHC.Types.Ordering
                     default y :: GHC.Classes.Ord a => a -> a -> GHC.Types.Ordering
                     xa :: a -> a -> GHC.Types.Bool
                     default xa :: a -> a -> GHC.Types.Bool
                     {-# MINIMAL xa | y | xa | y #-}
      Hsig file:  class GHC.Classes.Eq a => Bloop a b | a -> b where
                    data family GMap a (v :: * -> *)
                    xa :: a -> a -> GHC.Types.Bool
                    default xa :: a -> a -> GHC.Types.Bool
                    y :: a -> a -> GHC.Types.Ordering
                    default y :: GHC.Classes.Ord a => a -> a -> GHC.Types.Ordering
                    {-# MINIMAL xa | y #-}
      The methods do not match:
        The names ‘xa’ and ‘y’ are different
        The types of ‘xa’ are different
        The default methods associated with ‘xa’ are not compatible
        The names ‘y’ and ‘xa’ are different
        The types of ‘y’ are different
        The default methods associated with ‘y’ are not compatible
    • while merging the signatures from:
        • p[H=<H>]:H
        • q[H=<H>]:H
        • ...and the local signature for H

bkp15.bkp:36:9: error:
    • Class ‘Bloop’ has conflicting definitions in the module
      and its hsig file
      Main module: class GHC.Classes.Eq a => Bloop a b | a -> b where
                     data family GMap a (v :: * -> *)
                     y :: a -> a -> GHC.Types.Ordering
                     default y :: GHC.Classes.Ord a => a -> a -> GHC.Types.Ordering
                     xa :: a -> a -> GHC.Types.Bool
                     default xa :: a -> a -> GHC.Types.Bool
                     {-# MINIMAL xa | y | xa | y #-}
      Hsig file:  class GHC.Classes.Eq a => Bloop a b | a -> b where
                    data family GMap a (v :: * -> *)
                    xa :: a -> a -> GHC.Types.Bool
                    default xa :: a -> a -> GHC.Types.Bool
                    y :: a -> a -> GHC.Types.Ordering
                    default y :: GHC.Classes.Ord a => a -> a -> GHC.Types.Ordering
                    {-# MINIMAL xa | y #-}
      The methods do not match:
        The names ‘xa’ and ‘y’ are different
        The types of ‘xa’ are different
        The default methods associated with ‘xa’ are not compatible
        The names ‘y’ and ‘xa’ are different
        The types of ‘y’ are different
        The default methods associated with ‘y’ are not compatible
    • while merging the signatures from:
        • p[H=<H>]:H
        • q[H=<H>]:H
        • ...and the local signature for H

This indicates some dependence on Unique ordering.

Trac metadata
Trac field Value
Version 8.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC ezyang
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information