Persisting Haskell ADTs The Relational Way

Typical DBMSes suffer from a data type impedance mismatch with Haskell data types. Using such DBMSes in Haskell is especially painful because Haskell has a very powerful typing system which the database promptly discards or “downsamples” due to lack of real type support.

Project:M36 is a DBMS which offers support for algebraic data types (ADTs) as first-class database-side values and support for record types to be marshaled from-and-to database tuples without any loss of type enforcement. Furthermore, database-side ADTs can be manipulated with database-side stored functions written in Haskell. Types can further be preserved with constraints which can also be written in Haskell.

Let’s take a closer look at the common blog post schema example for an example of how these features all fit together.

https://agentm.github.io/project-m36/posts/2017-10-08-haskell-adts-dbms.html

This thread was posted by one of our members via one of our news source trackers.

Corresponding tweet for this thread:

https://twitter.com/dev_talk/status/1351512359983058944

Share link for this tweet.


Related portal: