Dependently Typed Pattern Matching

The mechanism for declaring datatypes to model data structures in programming languages such as Standard ML and Haskell can offer both convenience in programming and clarity in code. With the introduction of dependent datatypes in DML, the programmer can model data structures with more accuracy, thu...

Full description

Bibliographic Details
Main Author: Xi,Hongwei
Format: Article in Journal/Newspaper
Language:English
Published: Journal of Universal Computer Science 2003
Subjects:
DML
Online Access:https://doi.org/10.3217/jucs-009-08-0851
https://lib.jucs.org/article/28087/
https://lib.jucs.org/article/28087/download/pdf/
Description
Summary:The mechanism for declaring datatypes to model data structures in programming languages such as Standard ML and Haskell can offer both convenience in programming and clarity in code. With the introduction of dependent datatypes in DML, the programmer can model data structures with more accuracy, thus capturing more program invariants. In this paper, we study some practical aspects of dependent datatypes that affect both type-checking and compiling pattern matching. The results, which have already been tested, demonstrate that dependent datatype can not only o#er various programming benefits but also lead to performance gains, yielding a concrete case where safer programs run faster.