var baz = require('./Foo/Baz.purs');
-var bar = require('./Foo/Bar.purs');
-
-console.log(Prelude, test, foo, baz, bar);
+console.log(Prelude, test, foo, baz);
import Data.Maybe (Maybe(..), fromMaybe, maybe)
import Data.String (joinWith)
import Data.String.Regex (match, noFlags, regex, test)
+import Data.Traversable (sequence)
import PursLoader.ChildProcess (ChildProcess(), spawn)
import PursLoader.FS (FS(), writeFileUtf8, findFileUtf8)
foreign import relative :: String -> String -> String
+foreign import resolve :: String -> String
+
mkPsci :: Array (Array String) -> Array (Array String) -> String
mkPsci srcs ffis = joinWith "\n" ((loadModule <$> concat srcs) <> (loadForeign <$> concat ffis))
where
liftEff (clearDependencies ref)
liftEff (addDependency ref (resourcePath ref))
+ liftEff (sequence $ (\src -> addDependency ref (resolve src)) <$> concat srcss)
foreignPath <- if hasForeign
then fromMaybe (pure Nothing) (findFFI ffiss <$> moduleName)