Skip to content

DeriveGeneric breaks when the same data name is used in different modules

That's the error you like too see, or rather not. ;(

[180 of 289] Compiling Agda.TypeChecking.Serialise ( src/full/Agda/TypeChecking/Serialise.hs, dist-2.4.2.4/build/Agda/TypeChecking/Serialise.o )

src/full/Agda/TypeChecking/Serialise.hs:1:1:
    Duplicate instance declarations:
      instance GHC.Generics.Datatype Agda.TypeChecking.Serialise.D1Name
        -- Defined at src/full/Agda/TypeChecking/Serialise.hs:1:1
      instance GHC.Generics.Datatype Agda.TypeChecking.Serialise.D1Name
        -- Defined at src/full/Agda/TypeChecking/Serialise.hs:1:1

src/full/Agda/TypeChecking/Serialise.hs:1:1:
    Duplicate instance declarations:
      instance GHC.Generics.Constructor
                 Agda.TypeChecking.Serialise.C1_0Name
        -- Defined at src/full/Agda/TypeChecking/Serialise.hs:1:1
      instance GHC.Generics.Constructor
                 Agda.TypeChecking.Serialise.C1_0Name
        -- Defined at src/full/Agda/TypeChecking/Serialise.hs:1:1

Problems:

  • no position in file
  • system generated names D1Name, C1_0Name
  • obvious bogus (same instance cannot be defined twice at same location)
  • leads me to suspect bug in Generics rather than in my code

Reproduce:

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