[commit: ghc] master: Fill in associated type defaults with DeriveAnyClass (2f74be9)

git at git.haskell.org git at git.haskell.org
Sat Oct 3 18:45:02 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2f74be9c8af1e167b21df1a27b96b6626cd446a9/ghc

>---------------------------------------------------------------

commit 2f74be9c8af1e167b21df1a27b96b6626cd446a9
Author: RyanGlScott <ryan.gl.scott at gmail.com>
Date:   Sat Oct 3 20:06:48 2015 +0200

    Fill in associated type defaults with DeriveAnyClass
    
    Summary:
    Unlike `-XDefaultSignatures`, `-XDeriveAnyClass` would not fill in
    associated type family defaults when deriving a class which contained
    them.
    
    In order to fix this properly, `tcATDefault` needed to be used from
    `TcGenDeriv`. To avoid a module import cycle, `tcATDefault` was moved
    from `TcInstDcls` to `TcClsDcl`.
    
    Fixes #10361.
    
    Test Plan: ./validate
    
    Reviewers: kosmikus, dreixel, bgamari, austin, simonpj
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1283
    
    GHC Trac Issues: #10361


>---------------------------------------------------------------

2f74be9c8af1e167b21df1a27b96b6626cd446a9
 compiler/typecheck/TcClassDcl.hs    | 73 ++++++++++++++++++++++++++++++++++++-
 compiler/typecheck/TcDeriv.hs       | 67 +++++++++++++++++++++++++++++++---
 compiler/typecheck/TcGenDeriv.hs    | 34 ++++++++---------
 compiler/typecheck/TcInstDcls.hs    | 62 ++-----------------------------
 docs/users_guide/7.12.1-notes.rst   |  3 ++
 docs/users_guide/glasgow_exts.rst   | 46 ++++++++++++++++++++++-
 testsuite/tests/generics/T10361a.hs | 32 ++++++++++++++++
 testsuite/tests/generics/T10361b.hs | 58 +++++++++++++++++++++++++++++
 testsuite/tests/generics/all.T      |  2 +
 9 files changed, 291 insertions(+), 86 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 2f74be9c8af1e167b21df1a27b96b6626cd446a9


More information about the ghc-commits mailing list