DiazCarrete, (edited ) Still getting the hang of #Haskell pattern synonyms.
🔗 https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/pattern_synonyms.html
🔗 https://gitlab.haskell.org/ghc/ghc/-/wikis/pattern-synonyms#explicitly-bidirectional-pattern-synonyms
the paper 🔗 https://repository.brynmawr.edu/compsci_pubs/68/It seems that, if you want to check for some value-level condition when matching, you need to bring in ViewPatterns. This is mentioned in the wiki but not (explicitly) in the GHC user guide.
Add comment