Javascript must be enabled to continue!
The Thoralf plugin: for your fancy type needs
View through CrossRef
Many fancy types (e.g., generalized algebraic data types, type families) require a type checker plugin. These fancy types have a type index (e.g., type level natural numbers) with an equality relation that is difficult or impossible to represent using GHC's built-in type equality. The most practical way to represent these equality relations is through a plugin that asserts equality constraints. However, such plugins are difficult to write and reason about.
In this paper, we (1) present a formal theory of reasoning about the correctness of type checker plugins for type indices, and, (2) apply this theory in creating Thoralf, a generic and extensible plugin for type indices that translates GHC constraint problems to queries to an external SMT solver. By "generic and extensible", we mean the restrictions on extending Thoralf are slight, and, if some type index could be encoded as an SMT sort, then a programmer could extend Thoralf by providing this encoding function.
Association for Computing Machinery (ACM)
Title: The Thoralf plugin: for your fancy type needs
Description:
Many fancy types (e.
g.
, generalized algebraic data types, type families) require a type checker plugin.
These fancy types have a type index (e.
g.
, type level natural numbers) with an equality relation that is difficult or impossible to represent using GHC's built-in type equality.
The most practical way to represent these equality relations is through a plugin that asserts equality constraints.
However, such plugins are difficult to write and reason about.
In this paper, we (1) present a formal theory of reasoning about the correctness of type checker plugins for type indices, and, (2) apply this theory in creating Thoralf, a generic and extensible plugin for type indices that translates GHC constraint problems to queries to an external SMT solver.
By "generic and extensible", we mean the restrictions on extending Thoralf are slight, and, if some type index could be encoded as an SMT sort, then a programmer could extend Thoralf by providing this encoding function.
Related Results
Fancy Pink Goat
Fancy Pink Goat
"Fancy Pink Goat" is a contemporary art piece from the Fancy Collection, created in Spain in 2022. It is a vividly colorful painting dominated by pink and blue, which are the signa...
Jeugdbescherming op maat: Een pilotonderzoek naar ARIJ-Needs
Jeugdbescherming op maat: Een pilotonderzoek naar ARIJ-Needs
Recentelijk is ARIJ-Needs ontwikkeld om professionals te ondersteunen in zowel behoeftetaxatie als besluitvorming over passende zorg voor gezinnen met risico’s op (herhaling van) k...
How to Publish Manuscript Using Quick Submit in Open Journal System (OJS) 2.0 For Editor
How to Publish Manuscript Using Quick Submit in Open Journal System (OJS) 2.0 For Editor
The purpose of this study is to show a step-by-step process for publishing journal articles using the Quick Submit Plugin in the Open Journal System (OJS) 2.0. The method used in t...
Influence of organisational defensive patterns on learning ICT
Influence of organisational defensive patterns on learning ICT
PurposeThe purpose of this paper is to investigate whether the IT professionals in a Hong Kong public transport company have a general perception of influence of the organisational...
Fancy Lollipop
Fancy Lollipop
"Fancy Lollipop" is a vibrant and energetic artwork featuring a blend of bold and bright colors. The color palette, which includes shades of blue, pink, and black, creates a sense ...
A Multi-Polygenic Risk Score Approach Incorporating Physical Activity Genotypes for Predicting Type 2 Diabetes and Associated Comorbidities: A FinnGen Study
A Multi-Polygenic Risk Score Approach Incorporating Physical Activity Genotypes for Predicting Type 2 Diabetes and Associated Comorbidities: A FinnGen Study
ABSTRACT
Aims/hypothesis
Genetic prediction of type 2 diabetes risk has proven difficult using current methods. Recent studies have shown...
Enhancing Facility Maintenance Using Knowledge-Based BIM Systems
Enhancing Facility Maintenance Using Knowledge-Based BIM Systems
Abstract
The operation phase of a building's lifecycle refers to the period during which the building is in active use. So, to keep all these facilities working with accep...
Investigation of the structural behaviour of non-conventional beams designed using a Topology Optimisation procedure
Investigation of the structural behaviour of non-conventional beams designed using a Topology Optimisation procedure
In this research we use topology optimisation to design statically determinate rectangular beams with different heights. For the sake of simplification, the constitutive material i...

