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 Yarns in the Fabrics of Lithuanian Folk Skirts
Fancy Yarns in the Fabrics of Lithuanian Folk Skirts
When manufacturing a fabric, it is very important to obtain a fabric with decorative, aesthetical and also functional characteristics. All these requirements can be satisfied when ...
TauREx 3.1 - Extending atmospheric retrieval with plugins.
TauREx 3.1 - Extending atmospheric retrieval with plugins.
AbstractTauREx 3.1 is the next version of the open-source python retrieval framework TauREx 3[1], which is backward-compatible with the previous version but offers a swathe of impr...
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...
"Ngopi Fancy as a Social Representation" A Phenomenological Study of Ngopi Fancy Posts on Instagram
"Ngopi Fancy as a Social Representation" A Phenomenological Study of Ngopi Fancy Posts on Instagram
The phenomenon of ngopi fancy coffee among young urban Indonesians has evolved into a social practice encompassing identity, status, and lifestyle representations. This study aims ...
Line of Thinking on the Numeral of Fancy Pigeons
Line of Thinking on the Numeral of Fancy Pigeons
Fancy pigeons are huge in number in the world. This is very tough to come into a concrete solution on their specific numbers. From the wild rock-pigeon, all fancy pigeons have bee...
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...
Advanced Volatile Memory Forensics through Autopsy Integration
Advanced Volatile Memory Forensics through Autopsy Integration
The main goal of this study is to design a novel plugin for the Autopsy forensic framework to enable forensic analysts to identify and extract volatile memory from small-scale digi...
Implementation Selection to Increase Body Weight Fancy Mice
Implementation Selection to Increase Body Weight Fancy Mice
Use laboratory animal for research purposes is often used especially in the fields of health research, food, agriculture, and livestock. The laboratory animal that is often used as...

