git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
s/psc-make/psc
5caf09aHarry Garrood
src/Language/PureScript/Bundle.hs+5−5
@@ -55,7 +55,7 @@ data ErrorMessage
55 | ErrorInFile FilePath ErrorMessage
55 | ErrorInFile FilePath ErrorMessage
56 deriving Show
56 deriving Show
57
57
58−-- | Modules are either "regular modules" (i.e. those generated by psc-make) or foreign modules.
58+-- | Modules are either "regular modules" (i.e. those generated by psc) or foreign modules.
59data ModuleType
59data ModuleType
60 = Regular
60 = Regular
61 | Foreign
61 | Foreign
@@ -104,8 +104,8 @@ printErrorMessage :: ErrorMessage -> [String]
104printErrorMessage (UnsupportedModulePath s) =
104printErrorMessage (UnsupportedModulePath s) =
105 [ "A CommonJS module has an unsupported name (" ++ show s ++ ")."
105 [ "A CommonJS module has an unsupported name (" ++ show s ++ ")."
106 , "The following file names are supported:"
106 , "The following file names are supported:"
107− , " 1) index.js (psc-make native modules)"
107+ , " 1) index.js (psc native modules)"
108− , " 2) foreign.js (psc-make foreign modules)"
108+ , " 2) foreign.js (psc foreign modules)"
109 ]
109 ]
110printErrorMessage InvalidTopLevel =
110printErrorMessage InvalidTopLevel =
111 [ "Expected a list of source elements at the top level." ]
111 [ "Expected a list of source elements at the top level." ]
@@ -387,7 +387,7 @@ isModuleEmpty (Module _ els) = all isElementEmpty els
387-- In particular, a module and its foreign imports share the same namespace inside PS.
387-- In particular, a module and its foreign imports share the same namespace inside PS.
388-- This saves us from having to generate unique names for a module and its foreign imports,
388-- This saves us from having to generate unique names for a module and its foreign imports,
389-- and is safe since a module shares a namespace with its foreign imports in PureScript as well
389-- and is safe since a module shares a namespace with its foreign imports in PureScript as well
390−-- (so there is no way to have overlaps in code generated by psc-make).
390+-- (so there is no way to have overlaps in code generated by psc).
391codeGen :: Maybe String -- ^ main module
391codeGen :: Maybe String -- ^ main module
392 -> String -- ^ namespace
392 -> String -- ^ namespace
393 -> [Module] -- ^ input modules
393 -> [Module] -- ^ input modules
@@ -518,7 +518,7 @@ codeGen optionsMainModule optionsNamespace ms = renderToString (NN (JSSourceElem
518-- This function performs dead code elimination, filters empty modules
518-- This function performs dead code elimination, filters empty modules
519-- and generates and prints the final Javascript bundle.
519-- and generates and prints the final Javascript bundle.
520bundle :: forall m. (Applicative m, MonadError ErrorMessage m)
520bundle :: forall m. (Applicative m, MonadError ErrorMessage m)
521− => [(ModuleIdentifier, String)] -- ^ The input modules. Each module should be javascript rendered from 'Language.PureScript.Make' or @psc-make@.
521+ => [(ModuleIdentifier, String)] -- ^ The input modules. Each module should be javascript rendered from 'Language.PureScript.Make' or @psc@.
522 -> [ModuleIdentifier] -- ^ Entry points. These module identifiers are used as the roots for dead-code elimination
522 -> [ModuleIdentifier] -- ^ Entry points. These module identifiers are used as the roots for dead-code elimination
523 -> Maybe String -- ^ An optional main module.
523 -> Maybe String -- ^ An optional main module.
524 -> String -- ^ The namespace (e.g. PS).
524 -> String -- ^ The namespace (e.g. PS).