Type Safe Redis Queries: A Case Study of Type-Level Programming in Haskell

08/30/2017
by   Ting-Yan Lai, et al.
0

Redis is an in-memory data structure store, often used as a database, with a Haskell interface Hedis. Redis is dynamically typed --- a key can be discarded and re-associated to a value of a different type, and a command, when fetching a value of a type it does not expect, signals a runtime error. We develop a domain-specific language that, by exploiting Haskell type-level programming techniques including indexed monad, type-level literals and closed type families, keeps track of types of values in the database and statically guarantees that type errors cannot happen for a class of Redis programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/17/2017

EffectiveSan: Type and Memory Error Detection using Dynamically Typed C/C++

Low-level programming languages such as C and C++ are vulnerable to erro...
research
06/29/2017

Constrained Type Families

We present an approach to support partiality in type-level computation w...
research
02/28/2023

Safe-DS: A Domain Specific Language to Make Data Science Safe

Due to the long runtime of Data Science (DS) pipelines, even small progr...
research
10/30/2020

Programming Metamorphic Algorithms: An Experiment in Type-Driven Algorithm Design

In dependently typed programming, proofs of basic, structural properties...
research
05/04/2019

A Type System for First-Class Layers with Inheritance, Subtyping, and Swapping

Context-Oriented Programming (COP) is a programming paradigm to encourag...
research
07/05/2019

Type-safe, Polyvariadic Event Correlation

The pivotal role that event correlation technology plays in todays appli...
research
08/01/2019

Refinement Kinds: Type-safe Programming with Practical Type-level Computation (Extended Version)

This work introduces the novel concept of kind refinement, which we deve...

Please sign up or login with your details

Forgot password? Click here to reset