Linearly Qualified Types: Generic Inference for Capabilities and Uniqueness
summary
Adds implicit linear constraints as qualified types and implements a constraint generation and inference algorithm that extends GHCs solver, desugaring the constraints into Core linear arrows so they become ordinary Linear Haskell. Builds mutable array examples showing concrete reduction of naming boilerplate and a direct style fromList via a special Linearly constraint that supports contraction and weakening. Implements a working prototype in GHC and proves soundness by desugaring; constraint solving and desugaring succeed for the examples.
AI-written summary · about
