ZuriHac 2016: Generic (and type-level) Programming with Generics-sop
3,258 views · Published 6 September 2016 · 1:10:24 · Indexed 10 November 2026
Channel: Google TechTalks · 2016 · Science & Technology
A Google TechTalk, July 22, 2016, presented by Andres Löh ABSTRACT: Many Haskell functions can be defined for a large class of datatypes in a systematic way. Examples include structural equality and comparisons, all kind of (de)serialization functions (plain text, JSON, binary, etc.), traversal and access functions such as lenses and their various variants, functions for querying and updating databases and many more. For some built-in type classes, Haskell offers the "deriving" construct, but GHC also has a "generics" feature that allows users to define their own derivable classes, without having to resort to Template Haskell. In this talk, I'm going to introduce "generics-sop", a library that supports such datatype-generic programming by means of a number of powerful, higher-order combinators that can be reused and composed in several ways. This approach makes use of several type-system extensions available for GHC, such as GADTs (in particular, for heterogeneous lists), data kinds, kind polymorphism, constraint kinds, and rank-n polymorphism. We will start from examples and see how we can define a few generic functions using generics-sop and then, as far as time permits, look more closely at how it all works. https://wiki.haskell.org/ZuriHac2016
More from this channel
-
34:17
Thinglink - A Free Product Code for Creative Work
-
32:48
Thinking Beyond Borders
-
44:29
Understanding Urban Environments Through the Use of...
-
46:05
Customer Centric Web Decision Making
-
46:04
Customizable Scalable Compute Intensive Stream Queries
-
51:26
All The Government's Information
-
41:35
Combining Discriminative Features to Infer Complex...
-
59:42
Dimensions of Reputation in Electronic Markets