Include online REPL


I am a german CS-teacher and a colleague and myself will publish an online-tutorial on FP using Elm.

At Core Language · An Introduction to Elm there is an online-REPL, that would fit perfectly in our tutorial. Is there a way to include that in our tutorial?

Would be great if this is feasible.


You could embed an Ellie on your tutorial, I’m not sure about the REPL. BTW, source code is available in the official repository.


I knew Ellie and I am pretty sure that we will use ist. The Link to the REPL Repo was new to me. Perhaps my knowledge of elm/JS will be enough to use that code some day to create an online REPL that can be included in any webspage, not only in a gitbook. Actually it isn‘t…

Thank you for your reply :grinning:

Tom, just out of curiosity: what tool / technology do you use to write your tutorial? Where do you want to execute the Elm code?

The tutorial will be published on, which is an online book for teaching and learning computer science in general at school. It is mainly written for students aged about 14-19 years, some parts for younger students. Most of the website uses Python as the teaching language. For OOP, I have created a chapter using Java with BlueJ/Greenfoot. There is also a chapter about functional programming with Python. However, we believe it would be much better to use a language that encourages functional thinking.

The website is developed using Kirby CMS (, which I am not very familiar with, as I am not involved in the technical aspects of the site. As an author, I write HTML code as static files. Almost every page on inf-schule corresponds to a single HTML file. Kirby creates the menu, generates permalinks, and so on.

Because of that, I am restricted in how I can use JavaScript. For example, I cannot include JS libraries in the head of the HTML file. Additionally, I am not very experienced in developing JS. I never liked JS very much, and it is not a programming language I would choose to teach. Choosing Elm as the programming language to teach FP has the side effect (who said FP doesn’t allow side effects :slight_smile: ) that I learn a language that I really like and that I can use to write small apps for inf-schule without having to improve my JS knowledge. The REPL plugin seems to depend on GitBook, so it appears to me that I cannot use it right away. If I had a JS file that one could include in any static webpage, it should also work for inf-schule.

Regarding the question “Where do you want to execute the Elm code?”: I thought the REPL runs completely in the browser. Does it connect to any server to execute the code?


Yes, looking at Repl.elm, it calls out to a server to evaluate the code and return a response.

BTW, I think it is great you are writing this online tutorial! There may even be some German speakers in the community who could help review the material.

Let us know how it goes!

Ah OK, thank you, I found it in checkEntry. So I guess including an online REPL will not be possible at the moment. :frowning:

I will post a link when the tutorial is available. I think this will be in about six months. There will be a part about FP in general using Elm, which should be applicable to almost any FP language and a second part about creating (very simple) dynamic webpages using Elm.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.