DiazCarrete, (edited )
@DiazCarrete@hachyderm.io avatar

Still getting the hang of 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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • haskell
  • ethstaker
  • DreamBathrooms
  • Durango
  • InstantRegret
  • mdbf
  • magazineikmin
  • everett
  • thenastyranch
  • Youngstown
  • slotface
  • Leos
  • modclub
  • kavyap
  • ngwrru68w68
  • JUstTest
  • tester
  • osvaldo12
  • GTA5RPClips
  • khanakhh
  • rosin
  • provamag3
  • tacticalgear
  • normalnudes
  • cubers
  • cisconetworking
  • megavids
  • anitta
  • lostlight
  • All magazines