[GHC] #10103: Outdated comment (or bug?) in TyCon.hs

#10103: Outdated comment (or bug?) in TyCon.hs -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.4 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- 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@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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10103 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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@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@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

#10103: Outdated comment (or bug?) in `types/TyCon.hs` -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler (Type | Version: 7.8.4 checker) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * component: Compiler => Compiler (Type checker) Comment: The section 'Views of types' in [https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/TypeType this wiki page] is outdated as well. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10103#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10103: Outdated comment (or bug?) in `types/TyCon.hs`
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.12.1
Component: Compiler (Type | Version: 7.8.4
checker) | Keywords:
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#10103: Outdated comment (or bug?) in `types/TyCon.hs` -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler (Type | Version: 7.8.4 checker) | Keywords: Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: I've fixed both, thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10103#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10103: Outdated comment (or bug?) in `types/TyCon.hs` -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler (Type | Version: 7.8.4 checker) | Keywords: Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by thomie): Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10103#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC