Skip to content
0:00 / 0:00

#haskell#alternativetypeclass#applicative

Chris Penner - Alternative by example - A typeclass for parsing, concurrency, logic programming

Konfy

4K subscribers • 13 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Chris Penner

Intermediate. Assumes working knowledge.

2.1K views3 years ago1 recommendation

Programming languagesSoftware designFunctional programmingLanguage design and type systems

Chris Penner explores the Alternative typeclass in Haskell, demonstrating its laws and practical applications in parsing, concurrency, and logic programming.

Special thanks to the Haskell Foundation for supporting the production of this video! Haskell Love 2021 schedule: emamo.com/event/haskell-love Haskell Love twitter: twitter.com/_haskellove This talk is a deep-dive on the Alternative typeclass from `Control.Applicative`, which provides a monoid over applicative functors, we love monoids, and we love applicatives, what do we get when we combine the two? We'll start off by exploring the typeclass and its laws by showing off some helpful examples, and develop some intuition at the same time. Next we'll look at a few examples of several unique instances of Alternative: lists, parsers, routing, MaybeT, STM and more! Scattered throughout we'll learn some fun and unexpected uses of combinators and how they interact in ways that are unexpected but are still useful. Did you know that parser combinators double as useful concurrency primitives!?

Why it's here

1 person recommends this

What people say. Recommended as a deep dive into the Alternative typeclass and its practical use cases.

u/ChrisPennerin r/haskell • Recommends

Alternative Typeclass By Example - Chris Penner - Haskell Love 2021