I'm now trying out a piece of code from:
https://mpickering.github.io/posts/2015-12-12-pattern-synonyms-8.html
{-# LANGUAGE PatternSynonyms #-}
pattern MyPoint :: Int -> Int -> (Int, Int)
pattern MyPoint{m, n} = (m,n)
m :: (Int, Int) -> Int
n :: (Int, Int) -> Int
test9 = (0,0) { m = 5 }
But test9 throws an error:
• ‘m’ is not a record selector
• In the expression: (0, 0) {m = 5}
How do I get test9 to work?