Views: a way for pattern matching to cohabit with data abstraction
POPL '87 Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
FPCA '89 Proceedings of the fourth international conference on Functional programming languages and computer architecture
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Compiling polymorphism using intensional type analysis
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Type-directed partial evaluation
POPL '96 Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Algebra of programming
Encoding types in ML-like languages
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
Intensional polymorphism in type-erasure semantics
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
Design patterns for functional strategic programming
Proceedings of the 2002 ACM SIGPLAN workshop on Rule-based programming
A lightweight implementation of generics and dynamics
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Scrap your boilerplate: a practical design pattern for generic programming
Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation
Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire
Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture
Calculating Functional Programs
Revised Lectures from the International Summer School and Workshop on Algebraic and Coalgebraic Methods in the Mathematics of Program Construction
Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming
Normalization and Partial Evaluation
Applied Semantics, International Summer School, APPSEM 2000, Caminha, Portugal, September 9-15, 2000, Advanced Lectures
Advanced Functional Programming, Second International School-Tutorial Text
Higher-Order Intensional Type Analysis
ESOP '02 Proceedings of the 11th European Symposium on Programming Languages and Systems
Dependency-style generic haskell
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
Generalizing generalized tries
Journal of Functional Programming
Journal of Functional Programming
Journal of Functional Programming
Science of Computer Programming - Special issue on mathematics of program construction (MPC 2002)
Proceedings of the ninth ACM SIGPLAN international conference on Functional programming
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Polytypic programming in haskell
IFL'03 Proceedings of the 15th international conference on Implementation of Functional Languages
Open data types and open functions
Proceedings of the 8th ACM SIGPLAN international conference on Principles and practice of declarative programming
RepLib: a library for derivable type classes
Proceedings of the 2006 ACM SIGPLAN workshop on Haskell
Design patterns as higher-order datatype-generic programs
Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming
Journal of Functional Programming
Proceedings of the 2007 ACM symposium on Applied computing
Generics for the working ML'er
ML '07 Proceedings of the 2007 workshop on Workshop on ML
A lightweight approach to datatype-generic rewriting
Proceedings of the ACM SIGPLAN workshop on Generic programming
Science of Computer Programming
Generic programming with fixed points for mutually recursive datatypes
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
What does aspect-oriented programming mean for functional programmers?
Proceedings of the 2009 ACM SIGPLAN workshop on Generic programming
Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages
Journal of Functional Programming
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Comparing approaches to generic programming in Haskell
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Finally tagless, partially evaluated: tagless staged interpreters for simpler typed languages
APLAS'07 Proceedings of the 5th Asian conference on Programming languages and systems
Scala for generic programmers: Comparing haskell and scala support for generic programming
Journal of Functional Programming
“Scrap your boilerplate” reloaded
FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
“Scrap your boilerplate” revolutions
MPC'06 Proceedings of the 8th international conference on Mathematics of Program Construction
Extensibility for the masses: practical extensibility with object algebras
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
Typed tagless final interpreters
SSGIP'10 Proceedings of the 2010 international spring school conference on Generic and Indexed Programming
Abstract syntax graphs for domain specific languages
PEPM '13 Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
Feature-Oriented programming with object algebras
ECOOP'13 Proceedings of the 27th European conference on Object-Oriented Programming
Hi-index | 0.00 |
A type-indexed function is a function that is defined for each member of some family of types. Haskell's type class mechanism provides collections of open type-indexed functions, in which the indexing family can be extended by defining a new type class instance but the collection of functions is fixed. The purpose of this paper is to present TypeCase: a design pattern that allows the definition of closed type-indexed functions, in which the index family is fixed but the collection of functions is extensible. It is inspired by Cheney and Hinze's work on lightweight approaches to generic programming. We generalise their techniques as a design pattern. Furthermore, we show that type-indexed functions with type-indexed types, and consequently generic functions with generic types, can also be encoded in a lightweight manner, thereby overcoming one of the main limitations of the lightweight approaches.