The Elm examples given in the book (especially from Day Two, forward) are for an older version of Elm. Elm 0.17 changed a lot of things in the language, including eliminating signals and moving a lot of the libraries around.
I’ve translated the Day Two examples from the book to run on Elm 0.18
Elm 0.17+ avoids callbacks using Subscriptions, not Signals: https://gist.github.com/mindbat/7afc23cad8da000e4b26de55986d4eaf
For all three of these examples, we need to swap signals for subscriptions:
- Counting Mouse Moves: https://gist.github.com/mindbat/237066ca2a083bd5bb4e449c82f72a74
- Counting Mouse Clicks: https://gist.github.com/mindbat/952478c9e79a6ff7e08b6fec914a8065
- Tracking Click Position: https://gist.github.com/mindbat/0a130d7185e9f6553fd1198e8862d8c0
This one had to be reworked to use the new Elm Architecture: https://gist.github.com/mindbat/edfc8329bd2a97f4f9a00d245fe35ce5
The car just needs a few tweaks to work properly: https://gist.github.com/mindbat/f106eeb324032064e493dec31dbbbc2f