Skip to main content

Type Generic Observing

  • Conference paper
  • First Online:
Book cover Trends in Functional Programming (TFP 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8843))

Included in the following conference series:

  • 606 Accesses

Abstract

Observing intermediate values helps to understand what is going on when your program runs. Gill presented an observation method for lazy functional languages that preserves the program’s semantics. However, users need to define for each type how its values are observed: a laborious task and strictness of the program can easily be affected. Here we define how any value can be observed based on the structure of its type by applying generic programming frameworks. Furthermore we present an extension to specify per observation point how much to observe of a value. We discuss especially functional values and behaviour based on class membership in generic programming frameworks.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. ACM SIGPLAN Workshop on Haskell

    Google Scholar 

  2. Braßel, B., Chitil, O., Hanus, M., Huch, F.: Observing functional logic computations. In: Jayaraman, B. (ed.) PADL 2004. LNCS, vol. 3057, pp. 193–208. Springer, Heidelberg (2004)

    Google Scholar 

  3. Chitil, O., Runciman, C., Wallace, M.: Freja, hat and hood - a comparative evaluation of three systems for tracing and debugging lazy functional programs. In: Mohnen, M., Koopman, P. (eds.) IFL 2000. LNCS, vol. 2011, pp. 176–193. Springer, Heidelberg (2001)

    Google Scholar 

  4. Hinze, R.: Generics for the masses. In: Proceedings of the International Conference on Functional Programming. ACM Press (2004)

    Google Scholar 

  5. Gibbons, J.: Comparing approaches to generic programming in haskell. In: Backhouse, R., Gibbons, J., Hinze, R., Jeuring, J. (eds.) SSDGP 2006. LNCS, vol. 4719, pp. 72–149. Springer, Heidelberg (2007)

    Google Scholar 

  6. Hinze, R., Löh, A.: “Scrap your boilerplate” revolutions. In: Uustalu, T. (ed.) MPC 2006. LNCS, vol. 4014, pp. 180–208. Springer, Heidelberg (2006)

    Google Scholar 

  7. Jansson, P., Jeuring, J.: PolyP – a polytypic programming language extension. In: Proceedings of the Symposium on Principles of Programming Languages. ACM Press (1997)

    Google Scholar 

  8. Jones, M.P., Reid, A.: The Yale Haskell Group, and the OGI School of Science & Engineering. The Hugs 98 User’s Guide (1994–2004). http://www.haskell.org/haskellwiki/Hugs

  9. Kiselyov, O.: Smash your boilerplate without class and typeable (2006). http://article.gmane.org/gmane.comp.lang.haskell.general/14086

  10. Lämmel, R., Peyton Jones, S.: Scrap your boilerplate: a practical design pattern for generic programming. In: ACM SIGPLAN Workshop on Types in Language Design and Implementation. ACM Press (2003)

    Google Scholar 

  11. Lämmel, R., Peyton Jones, S.: Scrap more boilerplate: reflection, zips, and generalised casts. In: Proceedings of the International Conference on Functional Programming. ACM Press (2004)

    Google Scholar 

  12. Lämmel, R., Peyton Jones, S.: Scrap your boilerplate with class: extensible generic functions. In: Proceedings of the International Conference on Functional Programming. ACM Press (2005)

    Google Scholar 

  13. Lämmel, R., Visser, J.: A strafunski application letter. In: Dahl, V. (ed.) PADL 2003. LNCS, vol. 2562, pp. 357–375. Springer, Heidelberg (2002)

    Google Scholar 

  14. Magalhães, J.P., Dijkstra, A., Jeuring, J., Löh, A.: A generic deriving mechanism for haskell. In: Proceedings of the Symposium on Haskell. ACM Press (2010)

    Google Scholar 

  15. Mitchell, N., Runciman, C.: Uniform boilerplate and list processing. In: Proceedings of the Haskell Workshop. ACM Press (2007)

    Google Scholar 

  16. Nilsson, H.: Declarative debugging for lazy functional languages. PhD thesis, Linköpings universitet (1998)

    Google Scholar 

  17. Oliveira, B.C.D.S., Hinze, R., Löh, A.: Extensible and modular generics for the masses. In: Proceedings of Trends in Functional Programming. Elsevier (2006)

    Google Scholar 

  18. Pope, B.: Declarative debugging with buddha. In: Vene, V., Uustalu, T. (eds.) AFP 2004. LNCS, vol. 3622, pp. 273–308. Springer, Heidelberg (2005)

    Google Scholar 

  19. Reinke, C.: GHood - graphical visualisation and animation of haskell object observations. In: Proceedings of the Haskell Workshop (2001)

    Google Scholar 

  20. Rodriguez, A., Jeuring, J., Jansson, P., Gerdes, A., Kiselyov, O., Oliveira, B.C.D.S.: Comparing libraries for generic programming in haskell. In: Proceedings of the Symposium on Haskell. ACM Press (2008)

    Google Scholar 

  21. Sheard, T., Peyton Jones, S.: Template meta-programming for haskell. In: Proceedings of the Workshop on Haskell. ACM Press (2002)

    Google Scholar 

  22. Wallace, M., Chitil, O., Brehm, T., Runciman, C.: Multiple-view tracing for haskell: a new hat. In: Proceedings of the 2001 ACM SIGPLAN Haskell Workshop (2001)

    Google Scholar 

  23. Winstanley, N., Meacham, J.: DrIFT Manual (2008). http://repetae.net/computer/haskell/DrIFT/drift.html

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Maarten Faddegon .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Faddegon, M., Chitil, O. (2015). Type Generic Observing. In: Hage, J., McCarthy, J. (eds) Trends in Functional Programming. TFP 2014. Lecture Notes in Computer Science(), vol 8843. Springer, Cham. https://doi.org/10.1007/978-3-319-14675-1_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-14675-1_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-14674-4

  • Online ISBN: 978-3-319-14675-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics