git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #1730 from hdgarrood/rename-psci-main
d9dbc95Phil Freeman
psci/PSCi.hs+2−2
@@ -202,7 +202,7 @@ createTemporaryModule exec PSCiState{psciImportedModules = imports, psciLetBindi
202 trace = P.Var (P.Qualified (Just supportModuleName) (P.Ident "eval"))
202 trace = P.Var (P.Qualified (Just supportModuleName) (P.Ident "eval"))
203 mainValue = P.App trace (P.Var (P.Qualified Nothing (P.Ident "it")))
203 mainValue = P.App trace (P.Var (P.Qualified Nothing (P.Ident "it")))
204 itDecl = P.ValueDeclaration (P.Ident "it") P.Public [] $ Right val
204 itDecl = P.ValueDeclaration (P.Ident "it") P.Public [] $ Right val
205− mainDecl = P.ValueDeclaration (P.Ident "main") P.Public [] $ Right mainValue
205+ mainDecl = P.ValueDeclaration (P.Ident "$main") P.Public [] $ Right mainValue
206 decls = if exec then [itDecl, mainDecl] else [itDecl]
206 decls = if exec then [itDecl, mainDecl] else [itDecl]
207 in
207 in
208 P.Module (P.internalModuleSourceSpan "<internal>") [] moduleName ((importDecl `map` imports) ++ lets ++ decls) Nothing
208 P.Module (P.internalModuleSourceSpan "<internal>") [] moduleName ((importDecl `map` imports) ++ lets ++ decls) Nothing
@@ -269,7 +269,7 @@ handleExpression val = do
269 case e of
269 case e of
270 Left errs -> printErrors errs
270 Left errs -> printErrors errs
271 Right _ -> do
271 Right _ -> do
272− psciIO $ writeFile indexFile "require('$PSCI').main();"
272+ psciIO $ writeFile indexFile "require('$PSCI')['$main']();"
273 process <- psciIO findNodeProcess
273 process <- psciIO findNodeProcess
274 result <- psciIO $ traverse (\node -> readProcessWithExitCode node nodeArgs "") process
274 result <- psciIO $ traverse (\node -> readProcessWithExitCode node nodeArgs "") process
275 case result of
275 case result of