typedKanren: Statically Typed Relational Programming with Exhaustive Matching in Haskell

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Kudasov, Nikolai, Starikov, Artem
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912008133148672
author Kudasov, Nikolai
Starikov, Artem
author_facet Kudasov, Nikolai
Starikov, Artem
contents We present a statically typed embedding of relational programming (specifically a dialect of miniKanren with disequality constraints) in Haskell. Apart from handling types, our dialect extends standard relational combinator repertoire with a variation of relational matching that supports static exhaustiveness checks. To hide the boilerplate definitions and support comfortable logic programming with user-defined data types we use generic programming via GHC.Generics as well as metaprogramming via Template Haskell. We demonstrate our dialect on several examples and compare its performance against some other known implementations of miniKanren.
format Preprint
id arxiv_https___arxiv_org_abs_2408_03170
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle typedKanren: Statically Typed Relational Programming with Exhaustive Matching in Haskell
Kudasov, Nikolai
Starikov, Artem
Programming Languages
We present a statically typed embedding of relational programming (specifically a dialect of miniKanren with disequality constraints) in Haskell. Apart from handling types, our dialect extends standard relational combinator repertoire with a variation of relational matching that supports static exhaustiveness checks. To hide the boilerplate definitions and support comfortable logic programming with user-defined data types we use generic programming via GHC.Generics as well as metaprogramming via Template Haskell. We demonstrate our dialect on several examples and compare its performance against some other known implementations of miniKanren.
title typedKanren: Statically Typed Relational Programming with Exhaustive Matching in Haskell
topic Programming Languages
url https://arxiv.org/abs/2408.03170