Hacker News new | ask | show | jobs
by anaphor 4479 days ago
How do view patterns make patterns "first-class"? To me that means able to manipulate them as values, I don't see how view patterns allow that, they're just syntactic sugar for case expressions.
1 comments

http://www.reddit.com/r/haskell/comments/1vpaey/pattern_syno...

I spoke too eagerly—the new feature is just named and namespaced patterns. It's a bit of a bump in power, but it's not fully general yet.

For true(-ish) first-class patterns take a look at Prisms in the lens package or some of the other first-class pattern libraries.