co-log: Composable Contravariant Comonadic Logging Component
In this talk I'm going to share key design decisions behind Haskell logging library called co-log.
This library combines multiple algebraic concepts in order to provide convenient and composable solution for the logging problem:
- Semigroup and Monoid
- Contravariant/Divisible/Decidable
- Comonads
I'm also going to show how we use this library in commercial Haskell projects.
Outline/Structure of the Talk
- High-level overview of the logging task
- Core data type in the `co-log` library
- Composability
- Contravariant
- Divisible
- Decidable
- Comonad
- Using co-log in your application
Learning Outcome
Better understanding of typeclasses like Contravariant, Divisible, Decidable. Learning how to use a logging framework in Haskell.
Target Audience
People using logging in their Haskell applications and interested in alternative approaches. Or people who want to know real world use cases for typeclasses like Contravariant.
Prerequisites for Attendees
Need to know:
- Haskell syntax: newtypes, function composition, higher-kinded types
- Basic higher-kinded typeclasses: Functor, Applicative, Monad
- IO monad
- Simple algebraic classes: Semigroup, Monoid
Good to know:
- Monad transformers
Links
Blog post on the subject:
Personal blog:
Comparison of the logging libraries in haskell:
schedule Submitted 1 year ago
People who liked this proposal, also liked:
-
keyboard_arrow_down
Bartosz Milewski - A Taste of Type Theory
60 Mins
Keynote
Beginner
We use types in programming, often without realizing how deeply rooted they are in the foundations of mathematics. There is a constant flow of ideas from type theory to programming (and back). We are familiar with algebraic data types; inductive types, like lists or trees; we've heard of dependent types and, in the future, we might encounter identity types and possibly get familiar with elements of homotopy type theory. I can't possibly talk about all of this, but I'll try to give you a little taste.