Idris: A language for type-driven development
>"In Idris, types are first-class constructs in the langauge.<p><i>This means types can be passed as arguments to functions, and returned from functions just like any other value, such as numbers, strings, or lists.</i><p>This is a small but powerful idea, enabling:<p>o Relationships to be expressed between values; for example, that two lists have the same length.<p>o Assumptions to be made explicit and checked by the compiler. For example, if you assume that a list is non-empty, Idris can ensure this assumption always holds before the program is run.<p>o If desired, properties of program behaviour to be formally stated and proven."<p>PDS: I'd be curious to know about any/all languages where types can be passed to functions, returned from functions -- and even generated at runtime by functions... that is, where the language regards types as first-class constructs...