Implement -fprint-expanded-synonyms
authorÖmer Sinan Ağacan <omeragacan@gmail.com>
Thu, 16 Jul 2015 22:02:09 +0000 (00:02 +0200)
committerBen Gamari <ben@smart-cactus.org>
Thu, 16 Jul 2015 22:07:30 +0000 (00:07 +0200)
commitae96c751c869813ab95e712f8daac8516bb4795f
treebe6c84598963debb99019cb1a90367e5097aedba
parent82f1c78718828e0b49fc6f6ed140234e016e4c7a
Implement -fprint-expanded-synonyms

Add a flag to print type-synonyms-expanded versions of types in type
error messages (in addition to old error messages with synonyms)

 * Mailing list discussion: https://mail.haskell.org/pipermail/ghc-devs/2015-June/009247.html
 * Wiki page: https://wiki.haskell.org/Expanding_type_synonyms_in_error_messages_proposal
 * Trac: https://ghc.haskell.org/trac/ghc/ticket/10547

Test Plan:
 * I'll find some examples and add tests.

Reviewers: austin, simonpj, goldfire, bgamari

Reviewed By: austin, simonpj, goldfire, bgamari

Subscribers: rodlogic, thomie, bgamari

Differential Revision: https://phabricator.haskell.org/D1016

GHC Trac Issues: #10547
15 files changed:
compiler/main/DynFlags.hs
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcType.hs
docs/users_guide/7.12.1-notes.xml
docs/users_guide/flags.xml
docs/users_guide/using.xml
testsuite/tests/typecheck/should_fail/ExpandSynsFail1.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/ExpandSynsFail1.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/ExpandSynsFail2.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/ExpandSynsFail2.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/ExpandSynsFail3.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/ExpandSynsFail3.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/ExpandSynsFail4.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/ExpandSynsFail4.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T