The Haskell Unfolder Episode 6: computing type class dictionaries

Today, 2023-06-28, at 1830 UTC (11:30 am PDT, 2:30 pm EDT, 7:30 pm BST, 20:30 CEST, …) we are streaming the sixth episode of the Haskell Unfolder live on YouTube:

This episode of the Unfolder returns to a more advanced topic. A function with a Show a constraint wants evidence that type a has a Show instance. But what if we want to return such evidence from a function? Can we compute it? When might we want to?

The Haskell Unfolder is a YouTube series about all things Haskell hosted by Edsko de Vries and Andres Löh, with episodes appearing approximately every two weeks.

We also have a GitHub repository with the code samples from the episodes:

And we have a public Google calendar listing the planned schedule:

(or ICal: https://calendar.google.com/calendar/ical/c_327de9ca66caa0307fd99de5b0e3fdd2ad1111ae857bd21659166c74b2b974f0%40group.calendar.google.com/public/basic.ics )

11 Likes

Great episode again. I was lacking this kind of resource that would allow me to refine my knowledge of advanced concepts. I could read papers, but watching you reason through bunch of examples is just so much more fun :grinning_face_with_smiling_eyes:

Are you guys accepting topic suggestions?
If so, I’d be interested in presentation about MemoTrie: Trie-based memo functions
The concepts behind the library are relatively clear to me (you’re building an in-memory data structure storing results in it and looking them up when the function is called with the same inputs again).
But what I have trouble wrapping my head around is when would the same “Trie” datastructure be reused again vs. when would it be garbage collected and would have to allocated again? Is this approach to memoization used in practice or are there alternative approaches? Would love to see a lecture on this :pray:

2 Likes

Thanks! Yes, we of course like to hear topic suggestions, and I’ll put this on our list.