Associate pattern synonyms with types in module exports
authorMatthew Pickering <matthewtpickering@gmail.com>
Wed, 11 Nov 2015 09:49:44 +0000 (10:49 +0100)
committerBen Gamari <ben@smart-cactus.org>
Wed, 11 Nov 2015 09:53:22 +0000 (10:53 +0100)
commit96621b1b4979f449e873513e9de8d806257c9493
treea8c3080fc878d0139256467d6f854586083df602
parent3cfe60aebb9de2a1d897a111f779eacb6614b7cc
Associate pattern synonyms with types in module exports

This patch implements #10653.

It adds the ability to bundle pattern synonyms with type constructors in
export lists so that users can treat pattern synonyms more like data
constructors.

Updates haddock submodule.

Test Plan: ./validate

Reviewers: goldfire, austin, bgamari

Reviewed By: bgamari

Subscribers: simonpj, gridaphobe, thomie

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

GHC Trac Issues: #10653
52 files changed:
compiler/basicTypes/Avail.hs
compiler/basicTypes/RdrName.hs
compiler/hsSyn/HsImpExp.hs
compiler/iface/LoadIface.hs
compiler/iface/MkIface.hs
compiler/main/HscTypes.hs
compiler/parser/Parser.y
compiler/parser/RdrHsSyn.hs
compiler/prelude/PrelInfo.hs
compiler/rename/RnEnv.hs
compiler/rename/RnNames.hs
compiler/rename/RnPat.hs
compiler/rename/RnSource.hs
compiler/typecheck/TcDeriv.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnTypes.hs
compiler/types/TyCon.hs
testsuite/tests/ghc-api/annotations/BundleExport.hs [new file with mode: 0644]
testsuite/tests/ghc-api/annotations/Makefile
testsuite/tests/ghc-api/annotations/all.T
testsuite/tests/ghc-api/annotations/bundle-export.stdout [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/Associated.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/Associated1.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/AssociatedInternal.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/AssociatedInternal1.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/ExportSyntax.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/ExportSyntaxImport.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/TransAssociated.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/all.T
testsuite/tests/patsyn/should_compile/export-record-selector.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/export-super-class.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/multi-export.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/poly-export.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/poly-export2.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/poly-export3.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/all.T
testsuite/tests/patsyn/should_fail/export-class.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-class.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-ps-rec-sel.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-ps-rec-sel.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-super-class-fail.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-syntax.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-syntax.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-type-synonym.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-type-synonym.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-type.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/export-type.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/import-syntax.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/import-syntax.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/poly-export-fail2.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/poly-export-fail2.stderr [new file with mode: 0644]
utils/haddock