addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

In The Brain of Andres Löh: Datatype-Generic Programming in Haskell

Important - Skills Matter are managing registrations - please sign up here - http://skillsmatter.com/podcast/home/a-haskell-lecture-with-leading-expert-andres-loh/

We're pleased to welcome back Andres Loh for an 'In The Brain' evening talk.

Haskell's deriving construct is both wonderful and magical at the same time: it is wonderful, because with just a single line of code, you can obtain functionality such as(de)serialization, comparison and traversal functions for your newly defined datatype; it is magical because all of this happens behind the scenes, by code deeply built into the compiler.

But does it have to be magic? Since recently, the Glasgow Haskell Compiler (GHC) supports a feature that lets you define your own derivable functionality! And it is not difficult to use, either. All you have to do is to understand a little bit about how Haskell datatypes can be uniformly represented using a limited set of simple datatypes. Then you define a class plus instances for this limited set of types, and get all the rest for free.

So-called datatype-generic functions let you properly express your code in terms of specific, user-defined datatypes without paying a price: for your new datatypes, you can still use lots of pre-defined functionality, simply by deriving it.

In the talk, I will explain all about how datatype-generic programming in GHC works, and I will present several examples of its use, including examples of how it already is successfully being used in some prominent Haskell libraries.

Join or login to comment.

12 went

Our Sponsors

  • Skills Matter

    Join Skills Matter to learn, innovate & share skills for better software

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy