Try Elm Site

There are times when we want to just write some Elm code and see what happens without having to install the Elm Platform and other required tools. The Try Elm site is perfect for that. Let’s run the Elm code for our home page on this site. Copy everything in the HomePage.elm file except the first line: module BeginningElm exposing (..) and paste it on the left hand side. After that click the Compile button. You should see our home page again on the right side.

The reason we can’t include the line that defines a module is because the Try Elm site creates a module of its own behind the scenes. And Elm doesn’t allow us to have two module definitions in one file. We will cover modules in detail in chapter 4.

Try Elm site is good for trying a one-off experimental code. As of this writing, it doesn’t provide a robust environment required for professional web application development. Hopefully, someday it will. One of the most painful things about being a programmer is having to install a gazillion tools that constantly conflict with each other creating a hellish environment that our tender soul can’t simply cope with. So if we could build beautiful applications in Elm right from a browser, we could be much happier. Let’s hope that day will be here soon.

Back to top

New chapters are coming soon!

Sign up for the Elm Programming newsletter to get notified!

* indicates required