Skip to main content
×
×
Home

Two-level types and parameterized modules

  • TIM SHEARD (a1) and EMIR PASALIC (a1)
Abstract

In this paper, we describe two techniques for the efficient, modularized implementation of a large class of algorithms. We illustrate these techniques using several examples, including efficient generic unification algorithms that use reference cells to encode substitutions, and highly modular language implementations. We chose these examples to illustrate the following important techniques that we believe many functional programmers would find useful. First, defining recursive data types by splitting them into two levels: a structure defining level, and a recursive knot-tying level. Second, the use of rank-2 polymorphism inside Haskell's record types to implement a kind of type-parameterized modules. Finally, we explore techniques that allow us to combine already existing recursive Haskell data-types with the highly modular style of programming proposed here.

Copyright
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 14 *
Loading metrics...

Abstract views

Total abstract views: 112 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 12th June 2018. This data will be updated every 24 hours.

Two-level types and parameterized modules

  • TIM SHEARD (a1) and EMIR PASALIC (a1)
Submit a response

Discussion

No Discussion have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *