Type reification with PureScript by Anupam Jain #FnConf 2022
Channel: ConfEngine
Date: 2022-04-08

PureScript is a Haskell-like language that compiles to JavaScript. If you like Haskell, you will find yourself completely at home with PureScript. However there are a few interesting typelevel things from Haskell that are not provided by the PureScript compiler. The Type reification machinery is one of them.

In this talk, we'll understand the concept of type reification and its implementation using the Typeable typeclass. Essentially, using Typeable we can take a runtime value and get a value level representation of its type called a Typeref, this process is called type reification, which we can then compare with other known typerefs. We'll discuss indexed and unindexed typerefs and some real world problems that can be solved by this sort of type reification.

A significant part of the talk will involve details of how Typeable is implemented in Haskell, and how it can be approximated in PureScript even without compiler support (available as a library https://github.com/ajnsit/purescript-typeable/). We'll also discuss some alternatives approaches and their pros/cons.

More details: https://confengine.com/conferences/functional-conf-2022/proposal/16311

Conference Link: https://www.functionalconf.com