[GHC] #13578: Incorrect Record Pattern Synonym example in users guide

#13578: Incorrect Record Pattern Synonym example in users guide -------------------------------------+------------------------------------- Reporter: cjholdbrooks | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Documentation Unknown/Multiple | bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The first example in section 9.7.1 of the users guide provides the example {{{#!hs pattern Point :: (Int, Int) pattern Point{x, y} = (x, y) }}} which results in the error {{{ • Pattern synonym ‘Point’ has two arguments but its type signature has none • In the declaration for pattern synonym ‘Point’ }}} upon load. I believe the correct code is as follows. {{{#!hs pattern Point :: Int -> Int -> (Int, Int) pattern Point{x, y} = (x, y) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13578 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13578: Incorrect Record Pattern Synonym example in users guide -------------------------------------+------------------------------------- Reporter: cjholdbrooks | Owner: (none) Type: task | Status: new Priority: highest | Milestone: 8.2.1 Component: Documentation | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * priority: normal => highest * milestone: => 8.2.1 Comment: Thanks for pointing this out! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13578#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13578: Incorrect Record Pattern Synonym example in users guide -------------------------------------+------------------------------------- Reporter: cjholdbrooks | Owner: (none) Type: task | Status: new Priority: highest | Milestone: 8.2.1 Component: Documentation | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): Thanks for reporting this, it has already been fixed I think. Where are you viewing the docs? https://github.com/ghc/ghc/blob/master/docs/users_guide/glasgow_exts.rst#L47... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13578#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13578: Incorrect Record Pattern Synonym example in users guide -------------------------------------+------------------------------------- Reporter: cjholdbrooks | Owner: (none) Type: task | Status: infoneeded Priority: highest | Milestone: 8.2.1 Component: Documentation | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13578#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13578: Incorrect Record Pattern Synonym example in users guide -------------------------------------+------------------------------------- Reporter: cjholdbrooks | Owner: (none) Type: task | Status: closed Priority: highest | Milestone: 8.2.1 Component: Documentation | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: infoneeded => closed * resolution: => fixed Comment: Indeed, this was fixed in bc7c730c613f5c35eea512955728d1e7a0d01aa9. Sadly, this is present in the [http://downloads.haskell.org/~ghc/8.0.1/docs/html/users_guide/glasgow_exts.h... #record-pattern-synonyms 8.0.1] and [http://downloads.haskell.org/~ghc/8.0.2/docs/html/users_guide/glasgow_exts.h... #record-pattern-synonyms 8.0.2] users' guides, but since this is fixed in GHC 8.2, I'm opting to close this ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13578#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC