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:
-
git clone agda/agda from github,
-
checkout this commit
https://github.com/agda/agda/commit/46823536559276807639488eae151a0e855fdb95
-
and try to compile with
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