on master help sign in
cosmetic: make a block of code more whitespace friendly
8bea3f0Evan Czaplicki
compiler/Generate/JavaScript.hs+10−9
@@ -306,15 +306,16 @@ generate unsafeModule =
306 modul = MakeSafe.metadataModule unsafeModule
306 modul = MakeSafe.metadataModule unsafeModule
307 thisModule = dotSep ("_elm" : names modul ++ ["values"])
307 thisModule = dotSep ("_elm" : names modul ++ ["values"])
308 programStmts =
308 programStmts =
309+ concat
309− concat [ setup (Just "_elm") (names modul ++ ["values"])
310+ [ setup (Just "_elm") (names modul ++ ["values"])
310− , [ IfSingleStmt () thisModule (ReturnStmt () (Just thisModule)) ]
311+ , [ IfSingleStmt () thisModule (ReturnStmt () (Just thisModule)) ]
311− , [ internalImports (List.intercalate "." (names modul)) ]
312+ , [ internalImports (List.intercalate "." (names modul)) ]
312− , concatMap jsImport . Set.toList . Set.fromList . map fst $ imports modul
313+ , concatMap jsImport . Set.toList . Set.fromList . map fst $ imports modul
313− , [ assign ["_op"] (ObjectLit () []) ]
314+ , [ assign ["_op"] (ObjectLit () []) ]
314− , concat $ evalState (mapM definition . fst . flattenLets [] $ program modul) 0
315+ , concat $ evalState (mapM definition . fst . flattenLets [] $ program modul) 0
315− , [ jsExports ]
316+ , [ jsExports ]
316− , [ ReturnStmt () (Just thisModule) ]
317+ , [ ReturnStmt () (Just thisModule) ]
317− ]
318+ ]
318
319
319 jsExports = assign ("_elm" : names modul ++ ["values"]) (ObjectLit () exs)
320 jsExports = assign ("_elm" : names modul ++ ["values"]) (ObjectLit () exs)
320 where
321 where