Opened 4 years ago

Closed 4 years ago

#5464 closed task (fixed)

Change the way the extra bindings for the generic representation are generated

Reported by: dreixel Owned by: dreixel
Priority: normal Milestone:
Component: Compiler Version: 7.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

This ticket serves to record an email conversation in which it was agreed that:

  • The extra bindings generated for the generic representation should come from genInst, and not from makeDerivSpecs.
  • GHC.Types should not import GHC.Generics; instead, the generic representation for GHC.Types types should be in GHC.Generics (using standalone deriving where necessary).

Change History (6)

comment:1 Changed 4 years ago by dreixel

I think this is now ready to be merged into the mainline. The relevant branch is fix#5464 on both the main repo and the ghc-prim repo. The differences, as shown by github:

https://github.com/ghc/ghc/compare/master...fix%235464

https://github.com/ghc/packages-ghc-prim/compare/master...fix%235464

comment:2 Changed 4 years ago by jpm@…

commit 29a97fded4010bd01aa0a17945c84258e285d421

Merge: 3aa2ee2... 6431f7c...
Author: Jose Pedro Magalhaes <[email protected]>
Date:   Fri Oct 7 08:02:26 2011 +0100

    Merge branch 'fix#5464'

 compiler/ghc.cabal.in                |    2 +-
 compiler/typecheck/TcDeriv.lhs       |  389 ++++++-------------------
 compiler/typecheck/TcGenDeriv.lhs    |  209 ++++++++------
 compiler/typecheck/TcGenGenerics.lhs |  529 ++++++++++++++++++++++++++++++++++
 compiler/typecheck/TcInstDcls.lhs    |   20 +-
 compiler/types/Generics.lhs          |  396 -------------------------
 6 files changed, 750 insertions(+), 795 deletions(-)

comment:3 Changed 4 years ago by jpm@…

commit 3f50b5b99e3c0634355d1daa4610c5c81bacbe78

Merge: acc2451... ec436fe...
Author: Jose Pedro Magalhaes <[email protected]>
Date:   Tue Oct 4 15:26:50 2011 +0100

    Merge branch 'master' into fix#5464

 aclocal.m4                                   |   90 +++
 compiler/basicTypes/Literal.lhs              |   10 +-
 compiler/basicTypes/Name.lhs                 |    8 +-
 compiler/basicTypes/Unique.lhs               |    3 +-
 compiler/cmm/CLabel.hs                       |  996 +++++++++++++-------------
 compiler/cmm/CmmBuildInfoTables.hs           |   30 +-
 compiler/cmm/CmmInfo.hs                      |   27 +-
 compiler/cmm/CmmLint.hs                      |  113 ++--
 compiler/cmm/CmmPipeline.hs                  |    9 +-
 compiler/cmm/CmmUtils.hs                     |    7 +-
 compiler/cmm/OldCmm.hs                       |   11 -
 compiler/cmm/OldPprCmm.hs                    |  100 ++--
 compiler/cmm/PprC.hs                         |  253 ++++----
 compiler/cmm/PprCmm.hs                       |   83 ++-
 compiler/cmm/PprCmmDecl.hs                   |   64 +-
 compiler/cmm/PprCmmExpr.hs                   |   87 ++--
 compiler/codeGen/CgBindery.lhs               |   19 +-
 compiler/codeGen/CgCon.lhs                   |    6 +-
 compiler/codeGen/CgInfoTbls.hs               |    5 +-
 compiler/codeGen/CgPrimOp.hs                 |    2 +-
 compiler/codeGen/StgCmmBind.hs               |   20 +-
 compiler/codeGen/StgCmmClosure.hs            |   21 +-
 compiler/codeGen/StgCmmEnv.hs                |    6 +-
 compiler/codeGen/StgCmmHeap.hs               |   58 +-
 compiler/codeGen/StgCmmLayout.hs             |   21 +-
 compiler/codeGen/StgCmmMonad.hs              |   12 +-
 compiler/codeGen/StgCmmPrim.hs               |    2 +-
 compiler/codeGen/StgCmmTicky.hs              |   11 +-
 compiler/coreSyn/CoreLint.lhs                |    2 +-
 compiler/coreSyn/CoreUtils.lhs               |  718 +++++++++----------
 compiler/deSugar/Coverage.lhs                |    9 +-
 compiler/deSugar/Desugar.lhs                 |    5 +-
 compiler/deSugar/DsCCall.lhs                 |    4 +-
 compiler/deSugar/DsForeign.lhs               |  320 +++++----
 compiler/deSugar/DsMeta.hs                   |    2 +-
 compiler/ghci/ByteCodeLink.lhs               |  164 ++---
 compiler/hsSyn/Convert.lhs                   |   10 +-
 compiler/hsSyn/HsDecls.lhs                   |   43 +-
 compiler/hsSyn/HsUtils.lhs                   |    2 +-
 compiler/iface/BinIface.hs                   |  291 +++++----
 compiler/iface/IfaceEnv.lhs                  |   35 +-
 compiler/iface/IfaceSyn.lhs                  |    9 +-
 compiler/iface/IfaceType.lhs                 |   86 +--
 compiler/iface/MkIface.lhs                   |   28 +-
 compiler/iface/TcIface.lhs                   |   23 -
 compiler/llvmGen/LlvmCodeGen.hs              |    8 +-
 compiler/llvmGen/LlvmCodeGen/Base.hs         |   46 +-
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs      |   18 +-
 compiler/llvmGen/LlvmCodeGen/Data.hs         |   10 +-
 compiler/llvmGen/LlvmCodeGen/Ppr.hs          |    6 +-
 compiler/main/DynFlags.hs                    |    4 +
 compiler/main/GhcMonad.hs                    |    3 +
 compiler/main/HscMain.lhs                    |    6 +-
 compiler/nativeGen/AsmCodeGen.lhs            |   27 +-
 compiler/nativeGen/PIC.hs                    |  104 ++--
 compiler/nativeGen/PPC/CodeGen.hs            |    5 +-
 compiler/nativeGen/PPC/Ppr.hs                |  225 +++---
 compiler/nativeGen/PprBase.hs                |    7 +-
 compiler/nativeGen/RegAlloc/Graph/Main.hs    |   26 +-
 compiler/nativeGen/RegAlloc/Graph/Stats.hs   |    2 +-
 compiler/nativeGen/RegAlloc/Liveness.hs      |   22 +-
 compiler/nativeGen/SPARC/CodeGen/CondCode.hs |    7 +-
 compiler/nativeGen/SPARC/CodeGen/Gen64.hs    |    3 +-
 compiler/nativeGen/SPARC/Ppr.hs              |  230 +++---
 compiler/nativeGen/X86/CodeGen.hs            |   12 +-
 compiler/nativeGen/X86/Ppr.hs                |  106 ++--
 compiler/parser/Lexer.x                      |   21 +-
 compiler/parser/Parser.y.pp                  |   14 +-
 compiler/parser/ParserCore.y                 |   21 +-
 compiler/parser/RdrHsSyn.lhs                 |  593 ++++++++--------
 compiler/prelude/ForeignCall.lhs             |  191 +++---
 compiler/prelude/PrelInfo.lhs                |    2 +-
 compiler/prelude/PrelNames.lhs               |   68 ++-
 compiler/prelude/PrimOp.lhs                  |  203 +++---
 compiler/prelude/TysPrim.lhs                 |   14 +-
 compiler/prelude/TysWiredIn.lhs              |    5 +-
 compiler/prelude/primops.txt.pp              |   10 +-
 compiler/profiling/ProfInit.hs               |    9 +-
 compiler/rename/RnExpr.lhs                   |    2 +-
 compiler/rename/RnNames.lhs                  |   12 +-
 compiler/rename/RnSource.lhs                 |   54 +-
 compiler/rename/RnTypes.lhs                  |   17 +-
 compiler/typecheck/TcBinds.lhs               |    4 +-
 compiler/typecheck/TcForeign.lhs             |  160 +++--
 compiler/typecheck/TcHsSyn.lhs               |    4 +-
 compiler/typecheck/TcHsType.lhs              |    3 +
 compiler/typecheck/TcInstDcls.lhs            |   14 +-
 compiler/typecheck/TcMatches.lhs             |    1 -
 compiler/typecheck/TcRnMonad.lhs             |  704 +++++++++---------
 compiler/typecheck/TcRnTypes.lhs             |    1 +
 compiler/typecheck/TcTyClsDecls.lhs          |  124 ++--
 compiler/typecheck/TcType.lhs                |   50 +-
 compiler/types/FamInstEnv.lhs                |    2 +-
 compiler/types/TyCon.lhs                     |    6 +-
 compiler/utils/Binary.hs                     |   46 +-
 compiler/utils/Outputable.lhs                |   14 +-
 compiler/utils/Platform.hs                   |    1 +
 configure.ac                                 |  113 +---
 docs/users_guide/flags.xml                   |  174 +++--
 docs/users_guide/ghci.xml                    |   19 +-
 docs/users_guide/glasgow_exts.xml            |   33 +-
 docs/users_guide/runghc.xml                  |    4 +-
 docs/users_guide/using.xml                   |   92 ++-
 ghc/GhciMonad.hs                             |    2 +-
 utils/genprimopcode/Main.hs                  |    1 +
 utils/ghctags/Main.hs                        |    2 +-
 106 files changed, 3900 insertions(+), 3612 deletions(-)

comment:4 Changed 4 years ago by jpm@…

commit 8224782104e8ec8ad9300655d8ae77e45b952453

Merge: c93690d... 7bde01d...
Author: Jose Pedro Magalhaes <[email protected]>
Date:   Mon Sep 26 11:14:52 2011 +0200

    Merge branch 'fix#5464' of http://darcs.haskell.org/ghc into fix#5464
    
    Solved conflicts:
    	compiler/typecheck/TcGenDeriv.lhs

comment:5 Changed 4 years ago by jpm@…

commit c93690df31d295842e810ef1e92ae725d840f2ac

Author: Jose Pedro Magalhaes <[email protected]>
Date:   Thu Sep 8 08:07:14 2011 +0200

    Fix #5464: Change the way the extra bindings for the generic
    representation are generated.
    
    This is an initial commit; things seem to work but some
    clean up is still necessary (renaming functions, adding
    comments, etc.)

 compiler/typecheck/TcDeriv.lhs    |  265 ++++++++++++++++---------------------
 compiler/typecheck/TcGenDeriv.lhs |  188 +++++++++++++++-----------
 compiler/typecheck/TcInstDcls.lhs |   12 +-
 compiler/types/Generics.lhs       |   16 ++-
 4 files changed, 239 insertions(+), 242 deletions(-)

comment:6 Changed 4 years ago by dreixel

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.