Skip to content
evancz edited this page Oct 26, 2012 · 11 revisions

This wiki is a collaborative effort. If you want to help explain things, please edit the wiki!

Learning Elm

To program in Elm you need to understand three things: how to display, compute, and react. The following sections step through all of the language features you need to learn to master Elm. It is recommended that you learn them in the order they are listed. The basic examples page has small examples on almost all of these topics, so you can learn by example there.

Display

  • Graphics primitives (text, image, markdown, video)
  • Formatting an Element
  • Layout, putting Elements together.
  • Collage, easily use the HTML5 canvas

Compute

  • Numbers, Characters, Strings, Booleans, Lists
  • If-expressions
  • Functions
  • Recursion
  • Functions as Values
  • Higher-order Functions
  • Algebraic Data Types
  • Case-expressions

React

Serving Elm

Elm compiles down to HTML and JavaScript files, so you can serve Elm code with your existing infrastructure!

If you do not have existing infrastructure, the elm-server is a great way to set up a simple server. It is robust enough to be deployed on a VPS hosting service like Rackspace or Amazon's EC2.

You can also use the server from elm-lang.org as your starting point and customize it as necessary. See here for instructions. Again, this can definitely be deployed to any VPS hosting service, and that is exactly what I do for elm-lang.org.

If you want to write a custom server in Haskell, here are some helpful hints:

Clone this wiki locally