[GHC] #10103: Outdated comment (or bug?) in `types/TyCon.hs` (was: Outdated comment (or bug?) in TyCon.hs)
GHC
ghc-devs at haskell.org
Fri Feb 20 19:08:14 UTC 2015
#10103: Outdated comment (or bug?) in `types/TyCon.hs`
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.8.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by thomie:
Old description:
> The docstring for `coreExpandTyCon_maybe` says it should do something
> different than `tcExpandTyCon_maybe`, but it doesn't:
>
> {{{#!haskell
> -- ^ Used to create the view the /typechecker/ has on 'TyCon's.
> -- We expand (closed) synonyms only, cf. 'coreExpandTyCon_maybe'
> tcExpandTyCon_maybe = ...
>
> -- ^ Used to create the view /Core/ has on 'TyCon's. We expand
> -- not only closed synonyms like 'tcExpandTyCon_maybe',
> -- but also non-recursive @newtype at s
> coreExpandTyCon_maybe tycon tys = tcExpandTyCon_maybe tycon tys
> }}}
>
> If the code is correct, and the comment is just outdated, than Note
> [Newtype eta] and the docstring for `Type.coreView` should be updated as
> well.
>
> The last big change to `coreExpandTyCon_maybe` was made in commit
> fdf8656855d26105ff36bdd24d41827b05037b91.
New description:
The docstring for `coreExpandTyCon_maybe` says it should do something
different than `tcExpandTyCon_maybe`, but it doesn't:
{{{#!haskell
-- ^ Used to create the view the /typechecker/ has on 'TyCon's.
-- We expand (closed) synonyms only, cf. 'coreExpandTyCon_maybe'
tcExpandTyCon_maybe = ...
-- ^ Used to create the view /Core/ has on 'TyCon's. We expand
-- not only closed synonyms like 'tcExpandTyCon_maybe',
-- but also non-recursive @newtype at s
coreExpandTyCon_maybe tycon tys = tcExpandTyCon_maybe tycon tys
}}}
If the code is correct, and the comment is just outdated, than Note
[Newtype eta] and the docstrings for `Type.coreView` and `Type.tcView`
should be updated as well.
The last big change to `coreExpandTyCon_maybe` was made in commit
fdf8656855d26105ff36bdd24d41827b05037b91.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10103#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list