aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/AttachInstances.hs
Commit message (Collapse)AuthorAgeFilesLines
* Stable sort for (data/newtype) instancesalexbiehl2021-02-111-8/+17
|
* Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0Ben Gamari2021-01-051-2/+3
|\
| * Enable two warnings (#1245)tomjaguarpaw2020-12-081-0/+2
| | | | | | | | | | because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656
| * Clean up warningsAlec Theriault2020-03-221-1/+1
| | | | | | | | | | | | * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal`
* | Use functions exported from HsToCoreZubin Duggal2020-06-211-0/+1
| |
* | Adapt Haddock to LinearTypesKrzysztof Gogolewski2020-06-171-3/+3
| | | | | | | | See ghc/ghc!852.
* | Fix for GHC.Unit.* modulesSylvain Henry2020-04-271-1/+1
| |
* | Module structureSylvain Henry2020-04-241-3/+3
| |
* | Module renamingSylvain Henry2020-04-101-1/+1
| |
* | Modules: TypesSylvain Henry2020-03-181-5/+5
| |
* | Modules: Core (#13009)Sylvain Henry2020-03-021-5/+5
| |
* | Modules: Core (#13009)Sylvain Henry2020-02-251-1/+1
| |
* | Modules: Driver (#13009)Sylvain Henry2020-02-191-1/+1
|/
* Match GHC changes for T16185Alec Theriault2019-02-221-3/+3
| | | | | | | `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock.
* Refactor names + unused functions (#982)Alec Theriault2018-12-171-12/+2
| | | | | | | This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions
* Deduplicate some work in 'AttachInstances'Alec Theriault2018-11-051-27/+40
| | | | | | | | | Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too
* Accumulate explicitly which modules to load for 'attachInstances'Alec Theriault2018-07-231-4/+7
| | | | | | | | | | | | The old approach to fixing #469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context).
* Merge branch 'ghc-head' with 'ghc-8.4'Herbert Valerio Riedel2018-05-011-1/+1
|\
| * Match changes in GHC for TTGAlan Zimmerman2018-04-271-1/+1
| |
| * Pass to GHC visible modules for instance filteringAlec Theriault2018-01-061-1/+1
| | | | | | | | | | | | | | | | | | The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible.
* | Show where instances are defined (#748)Alec Theriault2018-03-211-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests
* | Warning free compilationAlexander Biehl2018-02-011-1/+0
| |
* | Pass to GHC visible modules for instance filteringAlec Theriault2018-02-011-1/+1
|/ | | | | | | | | The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible.
* Precise Haddock: Use Avails for export resolution (#688)Alexander Biehl2017-10-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting
* Revert "Don't use subMap in attachInstances"Alexander Biehl2017-10-051-3/+3
| | | | This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9.
* Don't use subMap in attachInstancesAlexander Biehl2017-10-051-3/+3
|
* Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-08-211-7/+9
|\
| * Lookup fixities for reexports without subordinates (#642)Alex Biehl2017-06-231-1/+2
| | | | | | | | | | So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In #644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from #642 top-level functions now started to fail reexporting their fixities.
| * Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639)Doug Wilson2017-06-221-42/+40
| | | | | | | | | | | | | | | | | | | | | | | | * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports
| * Haddock support for bundled pattern synonyms (#627)Christiaan Baaij2017-06-091-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after #631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case
* | Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636)Doug Wilson2017-06-211-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6
* | Rename extension index tagsAlan Zimmerman2017-06-051-3/+3
| |
* | Match new AST as per GHC wip/new-tree-one-paramAlan Zimmerman2017-06-051-3/+4
|/ | | | See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow
* Follow GHC re-adding FunTySimon Peyton Jones2016-06-151-6/+7
|
* Add missing importBen Gamari2015-12-261-0/+1
|
* Merge remote-tracking branch 'phadej/orphans' into ghc-headBen Gamari2015-12-201-1/+12
|\
| * Have source links for orphan instancesOleg Grenrus2015-09-281-12/+8
| |
| * Generate docs for orphan instancesOleg Grenrus2015-09-271-8/+23
| |
* | WarningsMatthew Pickering2015-12-141-2/+0
| |
* | Update for type=kindsRichard Eisenberg2015-12-141-7/+17
| |
* | Eliminate instanceHead' in favour of GHC's instanceSigSimon Peyton Jones2015-12-141-15/+1
|/ | | | | This is made possible by the elimination of "silent superclass parameters" in GHC
* Refactor instance head type to record instead of a meaningless tuple.Ɓukasz Hanuszczak2015-08-211-1/+1
|
* Attach to instance location the name that has the same location filejpmoresmau2015-06-121-5/+18
| | | | Fixes #383
* Links to source location of class instance definitionsjpmoresmau2015-01-221-5/+6
|
* Fix warningsMateusz Kowalczyk2014-11-041-2/+1
|
* Turn some uses of error into recoverable warningsMateusz Kowalczyk2014-11-041-25/+34
| | | | | | | This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end.
* Move sources under haddock-api/srcMateusz Kowalczyk2014-08-231-0/+221