[GHC] #8868: Old information in Extensions to data types and type synonyms

#8868: Old information in Extensions to data types and type synonyms ------------------------------------+-------------------------------------- Reporter: Kinokkory | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 7.6.1 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: Documentation bug Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+-------------------------------------- The Release notes for version 7.6.1 says http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/release-7-6-1.html The behavior of the TypeOperator extension has changed: previously, only type operators starting with ":" were considered type constructors, and other operators were treated as type variables. Now type operators are always constructors. But this change isn't reflected in the User's Guide. http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/data-type- extensions.html http://www.haskell.org/ghc/docs/7.6.2/html/users_guide/data-type- extensions.html http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/data-type- extensions.html A type variable can be an (unqualified) operator e.g. +. The lexical syntax is the same as that for variable operators, excluding "(.)", "(!)", and "(*)". In a binding position, the operator must be parenthesised. For example: ... I think this paragraph should be removed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8868 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8868: Old information in Extensions to data types and type synonyms --------------------------------------+------------------------------------ Reporter: Kinokkory | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Documentation | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Documentation bug | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Changes (by carter): * version: 7.6.1 => 7.8.1-rc2 * milestone: => 7.8.1 Comment: It looks like this isn't reflected in the new documention http://www.haskell.org/ghc/docs/7.8.1-rc1/html/users_guide/data-type- extensions.html#type-operators how would you propose changing the language? Or is the language correct as is? see eg ` A type constructor or class can be an operator, beginning with a colon; e.g. :*:. The lexical syntax is the same as that for data constructors. ` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8868#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8868: Old information in Extensions to data types and type synonyms --------------------------------------+------------------------------------ Reporter: Kinokkory | Owner: Type: bug | Status: new Priority: normal | Milestone: ⊥ Component: Documentation | Version: 7.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Documentation bug | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Changes (by Kinokkory): * version: 7.8.1-rc2 => 7.6.1 * milestone: 7.8.1 => ⊥ Comment: I just would like to make the User's Guide faithful to the behavior of the GHC 7.6.*. I'm not talking about the behavior of the release candidate. (I believe ''symbol infix type variables'' should be legal, but I'm not sure.) The problem is whether the GHC accepts this code. {{{ type T (+) = Int + Int f :: T Either f = Left 3 liftA2 :: Arrow (~>) => (a -> b -> c) -> (e ~> a) -> (e ~> b) -> (e ~> c) liftA2 = ... }}} The User's Guide of GHC 7.8.1-rc1 says http://www.haskell.org/ghc/docs/7.8.1-rc1/html/users_guide/data-type- extensions.html#type-operators In types, an operator symbol like (+) is normally treated as a type variable, just like a. ... As you can see, using operators in this way is not very useful, and Haskell 98 does not even allow you to write them infix. So it seems that the new version's documentation have reflected the change. If GHC isn't willing to change the documentations of released versions, close this ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8868#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8868: Old information in Extensions to data types and type synonyms --------------------------------------+------------------------------------ Reporter: Kinokkory | Owner: Type: bug | Status: closed Priority: normal | Milestone: ⊥ Component: Documentation | Version: 7.6.1 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Documentation bug | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Changes (by Kinokkory): * status: new => closed * resolution: => wontfix Comment: OK, the User's Guide of GHC 7.8.1-rc1 looks good, so I'll close this ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8868#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC