[GHC] #10487: Unhelpful error from instance Generic

GHC ghc-devs at haskell.org
Thu Jun 4 18:03:05 UTC 2015


#10487: Unhelpful error from instance Generic
-------------------------------------+-------------------------------------
              Reporter:              |             Owner:
  andreas.abel                       |            Status:  new
                  Type:  bug         |         Milestone:
              Priority:  normal      |           Version:  7.10.1
             Component:  Compiler    |  Operating System:  Unknown/Multiple
              Keywords:              |   Type of failure:  None/Unknown
          Architecture:              |        Blocked By:
  Unknown/Multiple                   |   Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 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
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10487>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list