Affiliation:
1. Standard Chartered Bank, UK
2. Standard Chartered Bank, Singapore
Abstract
As part of our software toolkit at a major financial institution we have a library for relational algebra. This library is written in C++ and the type checking of the operations on the relations is very dynamic; all relations have the same static type. Of course, relational algebra operations have stringent type constraints, and since we believe in static typing, we would prefer these to be checked at compile time.
We have managed to get full static type checking of the relational code, using some modern extensions to the Haskell type system, such as closed type families, type level strings, user-defined kinds, and custom type errors. The static type checking incurs no runtime overhead compared to the dynamically checked library.
Some effort has gone into making the use of the typed library similar to the dynamically typed version. We have also tried to produce good error messages when something is wrong.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference5 articles.
1. Polymorphic type inference for the named nested relational calculus
2. C.J. Date. An Introduction to Database Systems. Addison-Wesley Longman Publishing Co. Inc. Boston MA USA 8 edition 2003. ISBN 0321197844. C.J. Date. An Introduction to Database Systems. Addison-Wesley Longman Publishing Co. Inc. Boston MA USA 8 edition 2003. ISBN 0321197844.
3. Julian Fleischer. Named records. http://hackage.haskell.org/ package/named-records 2013. Julian Fleischer. Named records. http://hackage.haskell.org/ package/named-records 2013.
4. Strongly typed heterogeneous collections
5. Nikita Volkov. Record. http://hackage.haskell.org/ package/record 2015. Nikita Volkov. Record. http://hackage.haskell.org/ package/record 2015.