Refactoring on IdInfo and system derived names
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 15 Jan 2016 17:30:30 +0000 (17:30 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 18 Jan 2016 11:55:41 +0000 (11:55 +0000)
commitec8a188a927a4db2e709541765e5ef545eae284c
treecbde55cf4ee60e4265536aee730c7c41d668824e
parent6e0c0fd2e09c552bf38e22645347dbb2e7327e8e
Refactoring on IdInfo and system derived names

Some modest refactoring, triggered in part by Trac #11051

* Kill off PatSynId, ReflectionId in IdDetails
  They were barely used, and only for pretty-printing

* Add helper function Id.mkExportedVanillaId, and use it

* Polish up OccName.isDerivedOccName, as a predicate for
  definitions generated internally by GHC, which we
  might not want to show to the user.

* Kill off unused OccName.mkDerivedTyConOcc

* Shorten the derived OccNames for newtype and data
  instance axioms

* A bit of related refactoring around newFamInstAxiomName
38 files changed:
compiler/basicTypes/Id.hs
compiler/basicTypes/IdInfo.hs
compiler/basicTypes/OccName.hs
compiler/deSugar/DsExpr.hs
compiler/iface/MkIface.hs
compiler/typecheck/TcEnv.hs
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcTyClsDecls.hs
compiler/typecheck/TcTyDecls.hs
compiler/typecheck/TcTypeable.hs
testsuite/tests/deSugar/should_compile/T2431.stderr
testsuite/tests/ghci/scripts/T4175.stdout
testsuite/tests/ghci/scripts/T7939.stdout
testsuite/tests/indexed-types/should_compile/T3017.stderr
testsuite/tests/numeric/should_compile/T7116.stdout
testsuite/tests/partial-sigs/should_compile/ADT.stderr
testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
testsuite/tests/roles/should_compile/Roles1.stderr
testsuite/tests/roles/should_compile/Roles13.stderr
testsuite/tests/roles/should_compile/Roles14.stderr
testsuite/tests/roles/should_compile/Roles2.stderr
testsuite/tests/roles/should_compile/Roles3.stderr
testsuite/tests/roles/should_compile/Roles4.stderr
testsuite/tests/roles/should_compile/T8958.stderr
testsuite/tests/simplCore/should_compile/T3717.stderr
testsuite/tests/simplCore/should_compile/T3772.stdout
testsuite/tests/simplCore/should_compile/T4201.stdout
testsuite/tests/simplCore/should_compile/T4908.stderr
testsuite/tests/simplCore/should_compile/T4930.stderr
testsuite/tests/simplCore/should_compile/T7360.stderr
testsuite/tests/simplCore/should_compile/T9400.stderr
testsuite/tests/simplCore/should_compile/spec-inline.stderr
testsuite/tests/typecheck/should_compile/tc231.stderr