Microsoft Research334 тыс
Следующее
Опубликовано 7 сентября 2016, 16:04
Using `Generic Haskell`, an extension of the functional programming language Haskell, one can define `structurally polymorphic functions`: functions that take a type argument and are defined by induction on the structure of datatypes. Using this mechanism, functions such as equality, comparison, parsing and pretty printing, but also several forms of traversals and queries on data structures can be expressed. Such functions are defined once, in a type-safe way, and can then be used on all Haskell datatypes. The talk will introduce structural polymorphism in contrast to parametric and ad-hoc polymorphism, both of which are already supported in standard Haskell. The core features of Generic Haskell will be highlighted using several examples of type-indexed functions.
Случайные видео