From 2e2da2be94720a739c595ec179a7ed49480ce753 Mon Sep 17 00:00:00 2001 From: eric thul Date: Sun, 20 Dec 2015 22:11:16 -0500 Subject: Fixing compiler warnings --- src/PursLoader/Loader.purs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/PursLoader/Loader.purs') 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) import Data.Maybe (Maybe(..), fromMaybe, maybe) import Data.Either (Either(..)) import Data.String (joinWith) -import Data.String.Regex (match, noFlags, regex, test) +import Data.String.Regex (Regex(), match, noFlags, regex, test) import Data.Traversable (sequence) import Data.Foreign (F()) import Data.Foreign.Class (read) @@ -30,16 +30,22 @@ import PursLoader.Options (loaderFFIOption, loaderSrcOption, pscOptions, Options type Effects eff = (cp :: ChildProcess, fs :: FS, glob :: Glob, loader :: Loader, err :: EXCEPTION | eff) +moduleRegex :: Regex moduleRegex = regex "(?:^|\\n)module\\s+([\\w\\.]+)" noFlags { ignoreCase = true } +foreignRegex :: Regex foreignRegex = regex "(?:^|\\n)\\s*foreign import\\s+" noFlags { ignoreCase = true } +pscCommand :: String pscCommand = "psc" +psciCommand :: String psciCommand = "psci" +psciFilename :: String psciFilename = ".psci" +(!!!) :: forall a. Int -> Array a -> Maybe a (!!!) = flip (!!) foreign import cwd :: String -- cgit v1.2.3