co-log: Composable Contravariant Comonadic Logging Component

location_city Melbourne schedule May 15th 11:05 - 11:35 AM place Red Room people 85 Interested

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

  1. High-level overview of the logging task
  2. Core data type in the `co-log` library
  3. Composability
  4. Contravariant
  5. Divisible
  6. Decidable
  7. Comonad
  8. 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



schedule Submitted 2 years ago

  • Bartosz Milewski

    Bartosz Milewski - A Taste of Type Theory

    60 Mins

    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.