aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PursLoader/Loader.purs
diff options
context:
space:
mode:
Diffstat (limited to 'src/PursLoader/Loader.purs')
-rw-r--r--src/PursLoader/Loader.purs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/PursLoader/Loader.purs b/src/PursLoader/Loader.purs
index 205d3eb..a91667c 100644
--- a/src/PursLoader/Loader.purs
+++ b/src/PursLoader/Loader.purs
@@ -16,7 +16,7 @@ import Data.Function (Fn2(), mkFn2)
16import Data.Maybe (Maybe(..), fromMaybe, maybe) 16import Data.Maybe (Maybe(..), fromMaybe, maybe)
17import Data.Either (Either(..)) 17import Data.Either (Either(..))
18import Data.String (joinWith) 18import Data.String (joinWith)
19import Data.String.Regex (match, noFlags, regex, test) 19import Data.String.Regex (Regex(), match, noFlags, regex, test)
20import Data.Traversable (sequence) 20import Data.Traversable (sequence)
21import Data.Foreign (F()) 21import Data.Foreign (F())
22import Data.Foreign.Class (read) 22import Data.Foreign.Class (read)
@@ -30,16 +30,22 @@ import PursLoader.Options (loaderFFIOption, loaderSrcOption, pscOptions, Options
30 30
31type Effects eff = (cp :: ChildProcess, fs :: FS, glob :: Glob, loader :: Loader, err :: EXCEPTION | eff) 31type Effects eff = (cp :: ChildProcess, fs :: FS, glob :: Glob, loader :: Loader, err :: EXCEPTION | eff)
32 32
33moduleRegex :: Regex
33moduleRegex = regex "(?:^|\\n)module\\s+([\\w\\.]+)" noFlags { ignoreCase = true } 34moduleRegex = regex "(?:^|\\n)module\\s+([\\w\\.]+)" noFlags { ignoreCase = true }
34 35
36foreignRegex :: Regex
35foreignRegex = regex "(?:^|\\n)\\s*foreign import\\s+" noFlags { ignoreCase = true } 37foreignRegex = regex "(?:^|\\n)\\s*foreign import\\s+" noFlags { ignoreCase = true }
36 38
39pscCommand :: String
37pscCommand = "psc" 40pscCommand = "psc"
38 41
42psciCommand :: String
39psciCommand = "psci" 43psciCommand = "psci"
40 44
45psciFilename :: String
41psciFilename = ".psci" 46psciFilename = ".psci"
42 47
48(!!!) :: forall a. Int -> Array a -> Maybe a
43(!!!) = flip (!!) 49(!!!) = flip (!!)
44 50
45foreign import cwd :: String 51foreign import cwd :: String