Incorrect Record Pattern Synonym example in users guide
The first example in section 9.7.1 of the users guide provides the example
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.
pattern Point :: Int -> Int -> (Int, Int)
pattern Point{x, y} = (x, y)
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Documentation |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |