Type Generic Observing

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8843)

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.

References

  1. 1.
    ACM SIGPLAN Workshop on HaskellGoogle Scholar
  2. 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. 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. 4.
    Hinze, R.: Generics for the masses. In: Proceedings of the International Conference on Functional Programming. ACM Press (2004)Google Scholar
  5. 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. 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. 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. 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. 9.
    Kiselyov, O.: Smash your boilerplate without class and typeable (2006). http://article.gmane.org/gmane.comp.lang.haskell.general/14086
  10. 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. 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. 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. 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. 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. 15.
    Mitchell, N., Runciman, C.: Uniform boilerplate and list processing. In: Proceedings of the Haskell Workshop. ACM Press (2007)Google Scholar
  16. 16.
    Nilsson, H.: Declarative debugging for lazy functional languages. PhD thesis, Linköpings universitet (1998)Google Scholar
  17. 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. 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. 19.
    Reinke, C.: GHood - graphical visualisation and animation of haskell object observations. In: Proceedings of the Haskell Workshop (2001)Google Scholar
  20. 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. 21.
    Sheard, T., Peyton Jones, S.: Template meta-programming for haskell. In: Proceedings of the Workshop on Haskell. ACM Press (2002)Google Scholar
  22. 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. 23.
    Winstanley, N., Meacham, J.: DrIFT Manual (2008). http://repetae.net/computer/haskell/DrIFT/drift.html

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.University of KentCanterburyUK

Personalised recommendations