[commit: ghc] master: Refactor type family instance abstract syntax declarations (895a765)

git at git.haskell.org git at git.haskell.org
Tue Aug 29 18:01:33 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/895a7650a038131f3043f882c558c627abe9a61e/ghc

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

commit 895a7650a038131f3043f882c558c627abe9a61e
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Tue Aug 29 12:38:54 2017 -0400

    Refactor type family instance abstract syntax declarations
    
    This implements @simonpj's suggested refactoring of the abstract syntax
    for type/data family instances (from
    https://ghc.haskell.org/trac/ghc/ticket/14131#comment:9). This combines
    the previously separate `TyFamEqn` and `DataFamInstDecl` types into a
    single `FamEqn` datatype. This also factors the `HsImplicitBndrs` out of
    `HsTyPats` in favor of putting them just outside of `FamEqn` (as opposed
    to before, where all of the implicit binders were embedded inside of
    `TyFamEqn`/`DataFamInstDecl`). Finally, along the way I noticed that
    `dfid_fvs` and `tfid_fvs` were completely unused, so I removed them.
    
    Aside from some changes in parser test output, there is no change in
    behavior.
    
    Requires a Haddock submodule commit from my fork (at
    https://github.com/RyanGlScott/haddock/commit/815d2deb9c0222c916becccf84
    64b740c26255fd)
    
    Test Plan: ./validate
    
    Reviewers: simonpj, austin, goldfire, bgamari, alanz
    
    Reviewed By: bgamari
    
    Subscribers: mpickering, goldfire, rwbarton, thomie, simonpj
    
    GHC Trac Issues: #14131
    
    Differential Revision: https://phabricator.haskell.org/D3881


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

895a7650a038131f3043f882c558c627abe9a61e
 compiler/deSugar/DsMeta.hs                         |  24 ++--
 compiler/hsSyn/Convert.hs                          |  34 ++---
 compiler/hsSyn/HsDecls.hs                          | 145 ++++++++++++---------
 compiler/hsSyn/HsUtils.hs                          |   3 +-
 compiler/parser/Parser.y                           |  16 ++-
 compiler/parser/RdrHsSyn.hs                        |  40 +++---
 compiler/rename/RnNames.hs                         |   9 +-
 compiler/rename/RnSource.hs                        |  89 ++++++-------
 compiler/typecheck/TcEnv.hs                        |   3 +-
 compiler/typecheck/TcInstDcls.hs                   |  30 +++--
 compiler/typecheck/TcTyClsDecls.hs                 |  74 ++++++-----
 .../parser/should_compile/DumpParsedAst.stderr     | 116 ++++++++---------
 .../parser/should_compile/DumpRenamedAst.stderr    |  82 ++++++------
 utils/haddock                                      |   2 +-
 14 files changed, 349 insertions(+), 318 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 895a7650a038131f3043f882c558c627abe9a61e


More information about the ghc-commits mailing list