Hostname: page-component-586b7cd67f-dsjbd Total loading time: 0 Render date: 2024-11-25T07:05:15.263Z Has data issue: false hasContentIssue false

Functional unparsing

Published online by Cambridge University Press:  01 November 1998

OLIVIER DANVY
Affiliation:
BRICS, Department of Computer Science, University of Aarhus, Ny Munkegade, Building 540, DK-8000 Aarhus C, Denmark (e-mail: [email protected])
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

A string-formatting function such as printf in C seemingly requires dependent types, because its control string determines the rest of its arguments. Examples:

formula here

We show how changing the representation of the control string makes it possible to program printf in ML (which does not allow dependent types). The result is well typed and perceptibly more efficient than the corresponding library functions in Standard ML of New Jersey and in Caml.

Type
Research Article
Copyright
© 1998 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.