[GHC] #11588: haddock documents misleading type signature for TypeError in GHC.TypeLits

#11588: haddock documents misleading type signature for TypeError in GHC.TypeLits -------------------------------------+------------------------------------- Reporter: carter | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Documentation | Version: 8.0.1-rc2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ type family TypeError a :: b }}} is what is shown in the haddocks, which is misleading, at least to those accustomed to reading vanilla type families. 1) its impossible from the haddock info to know that the actual type signature is `type family TypeError (a :: ErrorMessage) :: b` , that requires reading the source of the module (a generally useful thing always, but still, disappointing that its needed to understand this) 2) i also need read the source to notice that the definition of the type family is a closed with no cases! It seems odd (at least to me) that haddock doesn't disclose the closedness. (this might be an artifact of it being an empty closed type family, which wasn't possible prior to ghc 8.0 anyways) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11588 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11588: haddock documents misleading type signature for TypeError in GHC.TypeLits -------------------------------------+------------------------------------- Reporter: carter | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Documentation | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- @@ -18,0 +18,4 @@ + + the relevant haddocks can be seen in the RC2 docs currently hosted at + http://downloads.haskell.org/~ghc/8.0.1-rc2/docs/html/libraries/base-4.9.0.0 + /GHC-TypeLits.html New description: {{{ type family TypeError a :: b }}} is what is shown in the haddocks, which is misleading, at least to those accustomed to reading vanilla type families. 1) its impossible from the haddock info to know that the actual type signature is `type family TypeError (a :: ErrorMessage) :: b` , that requires reading the source of the module (a generally useful thing always, but still, disappointing that its needed to understand this) 2) i also need read the source to notice that the definition of the type family is a closed with no cases! It seems odd (at least to me) that haddock doesn't disclose the closedness. (this might be an artifact of it being an empty closed type family, which wasn't possible prior to ghc 8.0 anyways) the relevant haddocks can be seen in the RC2 docs currently hosted at http://downloads.haskell.org/~ghc/8.0.1-rc2/docs/html/libraries/base-4.9.0.0 /GHC-TypeLits.html -- Comment (by carter): http://downloads.haskell.org/~ghc/8.0.1-rc2/docs/html/libraries/base-4.9.0.0 /GHC-TypeLits.html is a link -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11588#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11588: haddock documents misleading type signature for TypeError in GHC.TypeLits -------------------------------------+------------------------------------- Reporter: carter | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Documentation | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): This should be fixed by [[https://github.com/haskell/haddock/pull/483|Haddock #483]]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11588#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11588: haddock documents misleading type signature for TypeError in GHC.TypeLits -------------------------------------+------------------------------------- Reporter: carter | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: Documentation | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11588#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11588: haddock documents misleading type signature for TypeError in GHC.TypeLits -------------------------------------+------------------------------------- Reporter: carter | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Documentation | Version: 8.0.1-rc2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: This has been merged `haddock` and both `ghc-8.0` and `master` have been updated. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11588#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC