[commit: ghc] wip/zyla-T8095: Add -fomit-type-family-coercions (bfc9fc9)

git at git.haskell.org git at git.haskell.org
Tue Jul 18 09:16:46 UTC 2017


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

On branch  : wip/zyla-T8095
Link       : http://ghc.haskell.org/trac/ghc/changeset/bfc9fc95fd7939716b4762ebdb582d723e2b91b1/ghc

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

commit bfc9fc95fd7939716b4762ebdb582d723e2b91b1
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Tue Jul 18 09:13:54 2017 +0000

    Add -fomit-type-family-coercions
    
    Summary:
    Type family reduction creates a long chain of coercions witnessing the reduction sequence and intermediate types. This leads to long compile times and high memory usage.
    
    `-fomit-type-family-coercions` causes GHC to replace coercions coming from `flatten_fam_app` with `UnivCo`.
    
    TODO:
    - Introduce `OmittedProv` instead os just using `UnsafeCoerceProv`
    - Document the flag
    
    Test Plan:
    make TEST=OmitTyFamCoercions test
    
    It may also be beneficial to run the whole test suite with `-fomit-type-family-coercions`.
    
    Reviewers: austin, bgamari
    
    Subscribers: rwbarton, thomie
    
    Tags: #ghc
    
    GHC Trac Issues: #8095
    
    Differential Revision: https://phabricator.haskell.org/D3752


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

bfc9fc95fd7939716b4762ebdb582d723e2b91b1
 compiler/main/DynFlags.hs                          |   3 +
 compiler/typecheck/TcFlatten.hs                    |  17 ++-
 .../typecheck/should_compile/OmitTyFamCoercions.hs |  14 +++
 .../should_compile/OmitTyFamCoercions.stderr       | 126 +++++++++++++++++++++
 testsuite/tests/typecheck/should_compile/all.T     |   1 +
 utils/mkUserGuidePart/Options/Language.hs          |   7 ++
 6 files changed, 163 insertions(+), 5 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 bfc9fc95fd7939716b4762ebdb582d723e2b91b1


More information about the ghc-commits mailing list