Changelog for elm-compiler-0.15

0.15

Improve Import Syntax

The changes in 0.14 meant that people were seeing pretty long import sections, sometimes with two lines for a single module to bring it in qualified and to expose some unqualified values. The new syntax is like this:

import List
  -- Just bring `List` into scope, allowing you to say `List.map`,
  -- `List.filter`, etc.

import List exposing (map, filter)
  -- Bring `List` into scope, but also bring in `map` and `filter`
  -- without any prefix.

import List exposing (..)
  -- Bring `List` into scope, and bring in all the values in the
  -- module without a prefix.

import List as L
  -- Bring `L` into scope, but not `List`. This lets you say `L.map`,
  -- `L.filter`, etc.

import List as L exposing (map, filter)
  -- Bring `L` into scope along with unqualified versions of `map`
  -- and `filter`.

import List as L exposing (..)
  -- Bring in all the values unqualified and qualified with `L`.

This means you are doing more with each import, writing less overall. It also makes the default imports more comprehensive because you now can refer to List and Result without importing them explicitly as they are in the defaults.

Revise Port Syntax

One common confusion with the port syntax is that the only difference between incoming ports and outgoing ports is whether the type annotation comes with a definition. To make things a bit clearer, we are using the keywords foreign input and foreign output.

foreign input dbResults : Stream String

foreign output dbRequests : Stream String
foreign output dbRequests =
    Stream.map toRequest userNames

Input / Output

The biggest change in 0.15 is the addition of tasks, allowing us to represent arbitrary effects in Elm in a safe way. This parallels how ports work, so we are trying to draw attention to that in syntax. First addition is a way to create new inputs to an Elm program.

input actions : Input Action

This creates a Input that is made up of an Address you can send messages to and a Stream of those messages. This is similar to a foreign input except there we use the name as the address. The second addition is a way to run tasks.

output Stream.map toRequest userNames

This lets us turn tasks into effects in the world. Sometimes it is useful to pipe the results of these tasks back into Elm. For that, we have the third and final addition.

input results : Stream (Result Http.Error String)
input results from
    Stream.map toRequest userNames

0.14.1

Modify default import of List to expose (::) as well.

0.14

Breaking Changes

0.13

Improvements:

Breaking Changes:

0.12.3

0.12.1

Improvements:

Breaking Changes:

0.12

Breaking Changes:

Improvements:

0.11

0.10.1

0.10

0.9.1

0.9

Build Improvements:

Error Messages:

Syntax:

elm-server:

Libraries:

Bug Fixes:

Website:

forgot to fill this in again...

0.7.2

forgot to fill this in for a while...

0.5.0

0.4.0

This version is all about graphics: nicer API with more features and major efficiency improvements. I am really excited about this release!

0.3.6

0.3.5

0.3.0

Major Changes (Read this part!)

New Functions and Other Additions