Open Type Level Proofs in Haskell/Idris
In Idris/Haskell, one can prove properties of data by annotating the types and using GADT constructors, such as with Vect, however, this requires hardcoding the property into the type (e.g. a Vect has to be a separate type from a List). Is it possible to have types with an open set of properties (such as list carrying both a length and running average), for example by overloading constructors or using something in the vein of Effect? I believe that McBride has answered that question (for Type Theory) in his ornament paper (pdf) . The concept you are looking for is the one of an algebraic