
#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