Hi! I originally started at the Elm Architecture Tutorial, which told me to read the first two sections of the complete guide.
So, I read the Core Language tutorial, which was excellent and instructed me to download Elm and run the REPL to follow along with the tutorial.
However, when I moved on to the next section, Model The Problem, I noticed that the example snippets were much lengthier, and they weren't formatted in the REPL style of the previous tutorial. It seemed as though I was supposed to now be writing my code in a file and executing it somehow, but there weren't any instructions on how to do this.
I did try putting the first example in a foo.elm file and then running elm foo.elm, but this didn't work.
I also tried inputting the example code into the REPL, but surprisingly, even this didn't work:
> fortyTwo : Int \
| fortyTwo = \
| 42
-- SYNTAX PROBLEM -------------------------------------------- repl-temp-000.elm
I ran into something unexpected when parsing your code!
3│ fortyTwo : Int
^
I am looking for one of the following things:
end of input
whitespace
Running the above without the \ line continuations produced the same error.
It's not a huge problem, but it is a bit of a hiccup in my otherwise enjoyable experience learning this language so far. I like following along with tutorials so I can get practice writing the language and tinkering with the code to better understand it, but I guess I'll just read this tutorial for now. :grin:
Update: I ended up finding the Pragmatic Studio post on Getting Started With Elm and found it immensely helpful in bridging the gap between these two tutorials, because it introduces elm-reactor with some very simple example programs.
These resources have moved to guide.elm-lang.org. The transition happens on this page now, and is preceded by this page all about how each tool works. Hopefully that helps with this jagged path between pages!
Hi! I originally started at the Elm Architecture Tutorial, which told me to read the first two sections of the complete guide.
So, I read the Core Language tutorial, which was excellent and instructed me to download Elm and run the REPL to follow along with the tutorial.
However, when I moved on to the next section, Model The Problem, I noticed that the example snippets were much lengthier, and they weren't formatted in the REPL style of the previous tutorial. It seemed as though I was supposed to now be writing my code in a file and executing it somehow, but there weren't any instructions on how to do this.
I did try putting the first example in a
foo.elm
file and then runningelm foo.elm
, but this didn't work.I also tried inputting the example code into the REPL, but surprisingly, even this didn't work:
Running the above without the
\
line continuations produced the same error.It's not a huge problem, but it is a bit of a hiccup in my otherwise enjoyable experience learning this language so far. I like following along with tutorials so I can get practice writing the language and tinkering with the code to better understand it, but I guess I'll just read this tutorial for now. :grin:
Update: I ended up finding the Pragmatic Studio post on Getting Started With Elm and found it immensely helpful in bridging the gap between these two tutorials, because it introduces
elm-reactor
with some very simple example programs.