aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Convert.hs
Commit message (Collapse)AuthorAgeFilesLines
* Match changes for "Stop inferring over-polymorphic kinds"Alec Theriault2019-03-091-5/+2
| | | | | | | | The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock.
* Visible dependent quantification (#16326) changesRyan Scott2019-02-271-14/+19
|
* Match GHC changes for T16185Alec Theriault2019-02-221-11/+9
| | | | | | | `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.
* Fix tests broken by GHCAlec Theriault2019-02-161-1/+1
| | | | | | | | Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings.
* Changes from #14579Ryan Scott2019-02-041-22/+5
| | | | | We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`.
* Fix #1015 with dataConUserTyVars (#1022)Ryan Scott2019-02-041-3/+4
| | | | | | | The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes #1015.
* Miscellaneous improvements to `Convert` (#1020)Alec Theriault2019-02-031-143/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms
* Visible kind application haddock updatemynguyen2018-12-301-1/+1
|
* Properly synify and render promoted type variables (#985)Alec Theriault2018-12-231-1/+2
| | | | | | | | * Synify and render properly promoted type variables Fixes #923. * Accept output
* Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag changeAlp Mestanogullari2018-11-151-4/+5
| | | | It got introduced in ghc/ghc@ae2c9b40f5b6bf272251d1f4107c60003f541b62.
* More explicit foralls (GHC Proposal 0007)Matthew Yacavone2018-10-271-0/+2
|
* update dataFullSig to work with Co Quantificationningning2018-09-151-1/+1
| | | | This should have been in the previous patch, but wasn't.
* Update according to GHC Core changesningning2018-09-151-3/+3
|
* Only look at visible types when synifying a 'HsListTy'Alec Theriault2018-09-031-1/+1
| | | | | The other types are still looked at when considering whether to make a kind signature or not.
* Properly synify promoted list typesAlec Theriault2018-08-271-1/+15
| | | | | | | | | | | We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type]))))
* Handle promoted tuples in 'synifyType'Alec Theriault2018-08-211-0/+4
| | | | When we have a fully applied promoted tuple, we can expand it out properly.
* Better rendering of unboxed sums/tuplesAlec Theriault2018-08-211-0/+1
| | | | | * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType'
* Update against new HsImplicitBndrsRichard Eisenberg2018-08-021-2/+1
|
* eqTyCon_RDR now lives in TysWiredInRyan Scott2018-07-271-3/+4
| | | | | After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071
* tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880)Simon Jakobi2018-07-201-2/+46
| | | | | | | | | | | | * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes #879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9)
* Remove HsEqTy and XEqTyRyan Scott2018-06-191-2/+5
|
* Match changes in GHC for #14259Alan Zimmerman2018-06-191-2/+2
|
* Revert unintentional reversion of fix of #548Ben Gamari2018-06-141-2/+23
|
* Handle -XStarIsTypeVladislav Zavialov2018-06-141-26/+5
|
* Merge branch 'ghc-head' with 'ghc-8.4'Herbert Valerio Riedel2018-05-011-71/+84
|\
| * Match changes in GHC for TTGAlan Zimmerman2018-04-271-35/+42
| |
| * Match GHC for TTG implemented on HsBinds, D4581Alan Zimmerman2018-04-131-5/+5
| |
| * Match GHC changes for TTGAlan Zimmerman2018-04-091-24/+30
| |
| * Track changes to follow Trac #14529Simon Peyton Jones2017-12-071-13/+13
| | | | | | | | This tracks the refactoring of HsDecl.ConDecl.
* | Warning free compilationAlexander Biehl2018-02-011-1/+1
| |
* | Convert: Correct pass typeAlexander Biehl2018-02-011-2/+1
| |
* | Fix #548 by rendering datatype kinds more carefully (#702)Ryan Scott2018-02-011-3/+24
|/
* Revert "Match changes for Trees that Grow in GHC"Ben Gamari2017-11-211-32/+27
| | | | This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547.
* Actually render infix type operators as infix (#703)Ryan Scott2017-11-141-6/+17
| | | | | | * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too
* Match changes for Trees that Grow in GHCAlan Zimmerman2017-11-071-23/+28
|
* Fix Haddock rendering of kind-indexed data family instances (#694)Ryan Scott2017-10-281-5/+23
|
* Overhaul Haddock's rendering of kind signatures (#681)Ryan Scott2017-10-241-49/+120
| | | | | | | | | | | | | | | * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC
* Update for #14131Ryan Scott2017-08-231-9/+9
|
* Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-08-211-2/+2
|\
| * Fix haddock: internal error: links: UnhelpfulSpan (#561)Bartosz Nitka2017-07-021-2/+2
| | | | | | | | | | | | | | | | | | * Fix haddock: internal error: links: UnhelpfulSpan This fixes #554 for me. I believe this is another fall out of `wildcard-refactor`, like #549. * Comment to clarify why we take the methods name location
| * Update Haddock w.r.t. new HsImplicitBndrsRichard Eisenberg2017-03-141-2/+3
| |
* | Adapt to #14060Ryan Scott2017-08-141-1/+1
| |
* | Rename extension index tagsAlan Zimmerman2017-06-051-20/+20
| |
* | Match new AST as per GHC wip/new-tree-one-paramAlan Zimmerman2017-06-051-20/+20
| | | | | | | | See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow
* | Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEADBen Gamari2017-03-231-0/+1
|\ \
| * | Fix rendering of class methods for Eq and OrdBartosz Nitka2016-09-271-1/+3
| | | | | | | | | | | | | | | | | | See #549 and GHC issue #12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b)
| * | Fix printing of pattern synonym typesRik Steenkamp2016-04-041-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb)
| * | Changes due to fix for GHC#11648.Richard Eisenberg2016-03-151-3/+6
| | | | | | | | | | | | (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1)
| * | Follow-on changes to support RuntimeRepRichard Eisenberg2016-03-131-5/+4
| | | | | | | | | | | | (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c)
* | | Update Haddock w.r.t. new HsImplicitBndrsRichard Eisenberg2017-03-141-2/+3
| |/ |/|