[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
article

Functional unparsing

Published: 01 November 1998 Publication History

Abstract

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 hereWe 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.

References

[1]
Consel, C. and Danvy, O. (1993) Tutorial notes on partial evaluation. Proc. 20th Annual ACM Symposium on Principles of Programming Languages, Graham, S. L. (ed.), pp. 493-501. ACM Press.
[2]
Danvy, O. (1998) Functional unparsing (extended version). Technical Report BRICS RS-98-12, Department of Computer Science, University of Aarhus, Denmark.
[3]
Mairson, H. (1991) Outline of a proof theory of parametricity. Proc. 5th ACM Conference on Functional Programming and Computer Architecture, Hughes, J. (ed.), pp. 313-327. Lecture Notes in Computer Science 523. Springer-Verlag.
[4]
Shields, M., Sheard, T. and Jones, S. P. (1998) Dynamic typing as staged type inference. Proc. 25th Annual ACM Symposium on Principles Of Programming Languages, Cardelli, L. (ed.), pp. 289-302. ACM Press.
[5]
Yang, Z. (1998) Encoding types in ML-like languages (preliminary version). Technical Report BRICS RS-98-9. Department of Computer Science, University of Aarhus, Denmark.

Cited By

View all
  • (2019)Generic level polymorphic n-ary functionsProceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3331554.3342604(14-26)Online publication date: 18-Aug-2019
  • (2018)Partially-static data as free extension of algebrasProceedings of the ACM on Programming Languages10.1145/32367952:ICFP(1-30)Online publication date: 30-Jul-2018
  • (2017)Selective CPS transformation for shift and resetProceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/3162069(40-52)Online publication date: 25-Dec-2017
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Journal of Functional Programming
Journal of Functional Programming  Volume 8, Issue 6
November 1998
98 pages

Publisher

Cambridge University Press

United States

Publication History

Published: 01 November 1998

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 22 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media