-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Labels
cleanupRefactoring, clean-upRefactoring, clean-upperformanceAnalysis time, memory usageAnalysis time, memory usagetype-safetyType-safety improvementsType-safety improvements
Description
The query system uses a variant type for the question and a polymorphic variant type for the result.
Problem Every query has only a subset of valid return variants. This information is not encoded in the type, i.e., every question might return any result.
Idea Use GADTs. Problem Subtyping (r can't be covariant): code, issue.
Idea Get rid of need for subtyping (the result type seems partially redundant anyway):
type 'd r = Result of 'd | Top | Bot
let rec query : type d. d t -> d r = ...Metadata
Metadata
Labels
cleanupRefactoring, clean-upRefactoring, clean-upperformanceAnalysis time, memory usageAnalysis time, memory usagetype-safetyType-safety improvementsType-safety improvements