This page concerns questions that arose with Elm version 0.17.

For general questions see the main FAQ page.

Contents

Where are the official documents about Elm version 0.17?

Others have written about the conversion as well:

Why does elm-make complain “Cannot find module ‘Basics’”?

You need to install the elm-lang/core package.

This often arises when upgrading a package from 0.16 after removing all dependencies from elm-package.json.

Where is the evancz/elm-html package?

It’s now at elm-lang/html. See the upgrade guide about this and other core packages that moved.

Where is Effects.task?

It’s gone. Task.perform is used instead.

See some examples of how to convert to Task.perform.

Why am I getting “TypeError: Elm.embed is not a function”?

The JavaScript code for calling the Elm entry point must now look like this:

Elm.MyApp.embed(someElement);

It used to look like Elm.embed(Elm.MyApp, someElement).

It’s similar for the fullscreen and worker functions.

What happened to all the core modules?

Many core modules have been moved out into separate packages, usually under elm-lang.

  • Graphics is now in evancz/elm-graphics
  • Trampoline is now in elm-lang/trampoline and has some renames
    • Trampoline.trampoline is now Trampoline.evaluate
    • Trampoline.Done is now Trampoline.done (function instead of constructor)
    • Trampoline.Continue is now Trampoline.jump (function instead of constructor)
  • Mouse is now in elm-lang/mouse
  • Window is now in elm-lang/window
  • Keyboard is now in elm-lang/keyboard

Also:

  • maxsnew/lazy is now elm-lang/lazy

What is now in elm-community?

  • NoRedInk/elm-lazy-list is now elm-community/elm-lazy-list
  • NoRedInk/elm-random-extra is now elm-community/random-extra
    • Random.Bool has been removed as it is now in elm-lang/core’s Random
    • Random.Function has been removed entirely
  • deadfoxygrandpa/elm-test is now elm-community/elm-test
    • It no longer depends on laszlopandy/elm-console. To run tests in node use: ElmTest.runSuite
    • elementRunner is gone, use runSuiteHtml instead

Why am I getting “cannot find module” errors while upgrading a project from 0.16?

Cached or obsolete/renamed package versions may be getting in the way. To get a clean start, try these (from simplest to most drastic):

  1. Remove all of elm-stuff.
  2. Remove all the package names from the dependencies section of elm-package.json and install packages again as needed. You may have to explicitly install elm-lang/core again.
  3. Remove all of ~/.elm (on linux or Mac OSX) or ~/AppData/Roaming/elm/package (on Windows).

Does hot-reloading work in elm-reactor now?

Not yet. Work is well underway to improve elm-reactor.

Why does the compiler complain about “I am looking for one of the following things: whitespace” near the beginning of the file?

The exposing clause is now required at the beginning of each module. For example, you now need module Foo exposing (..) where prior to Elm 0.17 you could use module Foo where.

Are static ports still available?

No. In Elm 0.17 you’ll have to pass any static data from JS to Elm via the “flags” argument to the embed(), fullscreen(), or worker() functions.

Why does elm-make report “I cannot find module ‘Graphics.Collage’” even though evancz/elm-graphics is installed?

You now need to do import Collage to get that module. It’s no longer namespaced under Graphics.

Footnotes