-
elm make X.elm
- install dependencies found in
elm-package.json
- compile
X.elm
, and all modules it depends on - write concatenated output to
elm.js
- install dependencies found in
-
elm make X.elm --output=x.js
- write concatenated output to
x.js
- write concatenated output to
module prezi.a { | |
import Test = prezi.a.Test; | |
export function printNumber() { | |
console.log(Test.getNumber()); | |
} | |
} | |
module prezi.a { | |
export module Test { | |
export function getNumber(): number { |
this['Elm'] = (function() { | |
var Elm_Debug_make = function() { | |
function watchSummary() { | |
return "Banana1"; | |
} | |
function crash() { | |
throw new Error("crash"); | |
} |
The goal of the style guide is foremost to promote consistency and reuse of pattern from other languages in order to improve readability and make Elm easier for beginners. This includes moving Elm away from Haskell’s indentation style and even making some parts look closer to JavaScript. These decisions are intentional.
We would like Elm to look friendly and familiar to users of any language — especially JavaScript — so they can discover Elm’s powerful features without being overwhelmed. This does not intend to weaken or discourage any features of Elm, but instead to make them more accessible.
A secondary goal of the style guide is to encourage short diffs when changes are made. This makes changes more clear, and helps when multiple people are collaborating.
import Json | |
import Dict | |
import Http | |
import Graphics.Input as Input | |
jsonObject list = Json.Object (Dict.fromList list) | |
sendAfter sig = Http.send <| foldp (\b _ -> b) (Http.get "") sig | |
asObject obj = |