Document Open Access Logo

Haskelite: A Step-By-Step Interpreter for Teaching Functional Programming

Author Pedro Vasconcelos



PDF
Thumbnail PDF

File

OASIcs.ICPEC.2023.12.pdf
  • Filesize: 0.55 MB
  • 8 pages

Document Identifiers

Author Details

Pedro Vasconcelos
  • Departamento de Ciência de Computadores, Faculdade de Ciências da Universidade do Porto, Portugal
  • LIACC - Laboratório de Inteligência Artificial e Ciência de Computadores, Porto, Portugal

Acknowledgements

The author would like to thank Sandra Alves for helpful feedback on a earlier draft of this paper.

Cite AsGet BibTex

Pedro Vasconcelos. Haskelite: A Step-By-Step Interpreter for Teaching Functional Programming. In 4th International Computer Programming Education Conference (ICPEC 2023). Open Access Series in Informatics (OASIcs), Volume 112, pp. 12:1-12:8, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2023)
https://doi.org/10.4230/OASIcs.ICPEC.2023.12

Abstract

This paper describes Haskelite, a step-by-step interpreter for a small subset of Haskell. Haskelite is designed to help teach fundamental concepts of functional programming, namely: evaluation by rewriting; definition of functions using pattern-matching; recursion; higher-order functions; and on-demand evaluation. The interpreter is implemented in Elm and compiled to JavaScript, so it runs on the browser and requires no installation. This is on-going work and has yet to be fully evaluated; we present some initial experience in the classroom and highlight some points for improvement.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Functional languages
  • Information systems → Web applications
  • Software and its engineering → Interpreters
Keywords
  • Functional programming
  • Step-by-step evaluators
  • Web applications

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Richard Bird. Thinking Functionally with Haskell. Cambridge University Press, 2015. Google Scholar
  2. Richard Bird and Philip Wadler. Introduction to Functional Programming. Prentice-Hall, 1988. Google Scholar
  3. Manuel M. T. Chakravarty and Gabriele Keller. The risks and benefits of teaching purely functional programming in first year. Journal of Functional Programming, 14(1):113-123, 2004. URL: https://doi.org/10.1017/S0956796803004805.
  4. Manuel M. T. Chakravarty and Gabrielle Keller. An Introduction to Computing with Haskell. Pearson SprintPrint, 2002. URL: https://books.google.pt/books?id=qC3dAAAACAAJ.
  5. Evan Czaplicki. Elm: A delightful language for reliable web applications. https://elm-lang.org/, 2023. [Online; accessed June 2023].
  6. Evan Czaplicki and Stephen Chong. Asynchronous functional reactive programming for GUIs. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 411-422, New York, NY, USA, June 2013. ACM Press. Google Scholar
  7. Luis Damas and Robin Milner. Principal type-schemes for functional programs. In Proceedings of the 9th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '82, pages 207-212, New York, NY, USA, 1982. Association for Computing Machinery. URL: https://doi.org/10.1145/582153.582176.
  8. GHC developers. The ghci debugger. https://downloads.haskell.org/ghc/latest/docs/users_guide/ghci.html#the-ghci-debugger, 2023. [Online; accessed June 2023].
  9. Kees Doets and Jan van Eijck. The Haskell road to Logic, Maths and Programming. College Publications, 2004. Google Scholar
  10. Mozilla Foundation. Javascript MDN. https://developer.mozilla.org/en-US/docs/Web/JavaScript, 2023. [Online; accessed June 2023].
  11. Philip J. Guo. Python tutor. https://pythontutor.com/. [Online; acessed June 2023].
  12. Philip J. Guo. Online Python tutor: Embeddable web-based program visualization for Cs education. In Proceeding of the 44th ACM Technical Symposium on Computer Science Education, SIGCSE '13, pages 579-584, New York, NY, USA, 2013. Association for Computing Machinery. URL: https://doi.org/10.1145/2445196.2445368.
  13. Bastiaan Heeren, Daan Leijen, and Arjan van IJzendoorn. Helium, for learning Haskell. In Proceedings of the ACM SIGPLAN Haskell Workshop (Haskell'03), Uppsala, Sweden, page 62. ACM SIGPLAN, August 2003. URL: https://www.microsoft.com/en-us/research/publication/helium-for-learning-haskell/.
  14. John Hughes. Experiences from teaching functional programming at Chalmers. SIGPLAN Notices, 43(11):77-80, 2008. URL: https://doi.org/10.1145/1480828.1480845.
  15. Graham Hutton. Programming in Haskell. Cambridge University Press, 2nd edition, 2016. Google Scholar
  16. Stef Joosten, Klaas Van Den Berg, and Gerrit Van Der Hoeven. Teaching functional programming to first-year students. Journal of Functional Programming, 3(1):49-65, 1993. URL: https://doi.org/10.1017/S0956796800000599.
  17. Simon Marlow. Haskell 2010 language report. https://www.haskell.org/onlinereport/haskell2010/, 2023. [Online; accessed June 2023].
  18. Jan Paul Posma and Steve Krouse. Lambda lessons. https://stevekrouse.com/hs.js/, 2014. [Online; accessed April 2023].
  19. Judith Segal. Empirical studies of functional programming learners evaluating recursive functions. Instructional Science, 22:385-411, 1994. Google Scholar
  20. Simon Thompson. Haskell: The Craft of Functional Programming. Addison-Wesley, 3rd edition, 2011. Google Scholar
  21. Ville Tirronen, Samuel Uusi-Mäkelä, and Ville Isomöttönen. Understanding beginners' mistakes with Haskell. Journal of Functional Programming, 25:e11, 2015. URL: https://doi.org/10.1017/S0956796815000179.
  22. Philip Wadler. A critique of Abelson and Sussman or why calculating is better than scheming. SIGPLAN Notices, 22(3):83-94, 1987. URL: https://doi.org/10.1145/24697.24706.
  23. Danny Yoo, Emmanuel Schanzer, Shriram Krishnamurthi, and Kathi Fisler. WeScheme: The browser is your programming environment. In Proceedings of the 16th Annual Joint Conference on Innovation and Technology in Computer Science Education, ITiCSE '11, pages 163-167, New York, NY, USA, 2011. Association for Computing Machinery. URL: https://doi.org/10.1145/1999747.1999795.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail