on master help sign in
Import everything in `Elm` namespace into every Elm program.
commita46ff13fbdfd9c4268426db68c8e4db45e625ae6 authorevancz <info@elm-lang.org> dateTue 16 Oct 2012, 22:04 (14 years ago) parent453cd09
1 file changed+2−1
elm/src/Gen/CompileToJS.hs+2−1
elm/src/Gen/CompileToJS.hs+2−1
@@ -55,7 +55,8 @@ tryBlock escapees names e =
5555
5656jsModule (escapees, Module names exports imports stmts) =
5757 tryBlock escapees (tail modNames) $ concat
58− [ concatMap (\n -> globalAssign n $ n ++ " || {}") .
58+ [ "\nfor(var i in Elm) { this[i] = Elm[i]; }"
59+ , concatMap (\n -> globalAssign n $ n ++ " || {}") .
5960 map (intercalate ".") . drop 2 . inits $
6061 take (length modNames - 1) modNames
6162 , "\nif (" ++ modName ++ ") throw \"Module name collision, '" ++