| GADTless Programming in Haskell 98 (2008) | |||||||||||||||
Abstract | |||||||||||||||
| Abstract. Generalized algebraic data types (GADTs) allow to write sophisticated, type-safe programs and transformations. But not many languages, respectively their underlying implementations, support GADTs. We show that Pottier's and Gauthier's polymorphic typed defunctionalization, which was supposed to rely on GADTs, can actually be represented in Haskell 98. Our results help to get a better understanding of GADTs and we identify sufficient conditions under which we can replace GADTs with features available in standardized languages such as Haskell 98. 1 Introduction Generalized algebraic data types (GADTs) are an extension of (boxed) existen-tial types [12]. In contrast to algebraic data types we may refine the type of a GADT depending on the particular constructor. The power behind GADTs isthat we can make use of these type refinements when pattern matching over a GADT. | |||||||||||||||
Publication details | |||||||||||||||
| |||||||||||||||