diff options
author | eric thul <thul.eric@gmail.com> | 2015-12-20 22:11:16 -0500 |
---|---|---|
committer | eric thul <thul.eric@gmail.com> | 2015-12-20 22:11:16 -0500 |
commit | 2e2da2be94720a739c595ec179a7ed49480ce753 (patch) | |
tree | 9b1b4763ca5e05d9211fec771df09ec29fb9fb34 /src | |
parent | 94cc1cdd03b9c2115813a698b1e4337bce894321 (diff) | |
download | purs-loader-2e2da2be94720a739c595ec179a7ed49480ce753.tar.gz purs-loader-2e2da2be94720a739c595ec179a7ed49480ce753.tar.zst purs-loader-2e2da2be94720a739c595ec179a7ed49480ce753.zip |
Fixing compiler warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/PursLoader/Loader.purs | 8 | ||||
-rw-r--r-- | src/PursLoader/LoaderUtil.purs | 2 | ||||
-rw-r--r-- | src/PursLoader/Options.purs | 15 |
3 files changed, 20 insertions, 5 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) | |||
16 | import Data.Maybe (Maybe(..), fromMaybe, maybe) | 16 | import Data.Maybe (Maybe(..), fromMaybe, maybe) |
17 | import Data.Either (Either(..)) | 17 | import Data.Either (Either(..)) |
18 | import Data.String (joinWith) | 18 | import Data.String (joinWith) |
19 | import Data.String.Regex (match, noFlags, regex, test) | 19 | import Data.String.Regex (Regex(), match, noFlags, regex, test) |
20 | import Data.Traversable (sequence) | 20 | import Data.Traversable (sequence) |
21 | import Data.Foreign (F()) | 21 | import Data.Foreign (F()) |
22 | import Data.Foreign.Class (read) | 22 | import Data.Foreign.Class (read) |
@@ -30,16 +30,22 @@ import PursLoader.Options (loaderFFIOption, loaderSrcOption, pscOptions, Options | |||
30 | 30 | ||
31 | type Effects eff = (cp :: ChildProcess, fs :: FS, glob :: Glob, loader :: Loader, err :: EXCEPTION | eff) | 31 | type Effects eff = (cp :: ChildProcess, fs :: FS, glob :: Glob, loader :: Loader, err :: EXCEPTION | eff) |
32 | 32 | ||
33 | moduleRegex :: Regex | ||
33 | moduleRegex = regex "(?:^|\\n)module\\s+([\\w\\.]+)" noFlags { ignoreCase = true } | 34 | moduleRegex = regex "(?:^|\\n)module\\s+([\\w\\.]+)" noFlags { ignoreCase = true } |
34 | 35 | ||
36 | foreignRegex :: Regex | ||
35 | foreignRegex = regex "(?:^|\\n)\\s*foreign import\\s+" noFlags { ignoreCase = true } | 37 | foreignRegex = regex "(?:^|\\n)\\s*foreign import\\s+" noFlags { ignoreCase = true } |
36 | 38 | ||
39 | pscCommand :: String | ||
37 | pscCommand = "psc" | 40 | pscCommand = "psc" |
38 | 41 | ||
42 | psciCommand :: String | ||
39 | psciCommand = "psci" | 43 | psciCommand = "psci" |
40 | 44 | ||
45 | psciFilename :: String | ||
41 | psciFilename = ".psci" | 46 | psciFilename = ".psci" |
42 | 47 | ||
48 | (!!!) :: forall a. Int -> Array a -> Maybe a | ||
43 | (!!!) = flip (!!) | 49 | (!!!) = flip (!!) |
44 | 50 | ||
45 | foreign import cwd :: String | 51 | foreign import cwd :: String |
diff --git a/src/PursLoader/LoaderUtil.purs b/src/PursLoader/LoaderUtil.purs index 3e5a7bc..45495c8 100644 --- a/src/PursLoader/LoaderUtil.purs +++ b/src/PursLoader/LoaderUtil.purs | |||
@@ -4,6 +4,4 @@ module PursLoader.LoaderUtil | |||
4 | 4 | ||
5 | import Data.Foreign (Foreign()) | 5 | import Data.Foreign (Foreign()) |
6 | 6 | ||
7 | import PursLoader.LoaderRef (LoaderRef()) | ||
8 | |||
9 | foreign import parseQuery :: String -> Foreign | 7 | foreign import parseQuery :: String -> Foreign |
diff --git a/src/PursLoader/Options.purs b/src/PursLoader/Options.purs index 1650652..3657d1a 100644 --- a/src/PursLoader/Options.purs +++ b/src/PursLoader/Options.purs | |||
@@ -6,37 +6,48 @@ module PursLoader.Options | |||
6 | , output | 6 | , output |
7 | ) where | 7 | ) where |
8 | 8 | ||
9 | import Prelude (Unit(), (<>), (<$>), (<<<), (++), (<*>), ($), const, id) | 9 | import Prelude ((<>), (<$>), (<<<), (++), (<*>), ($), const, id) |
10 | 10 | ||
11 | import Data.Array (concat) | 11 | import Data.Array (concat) |
12 | import Data.Either (either) | 12 | import Data.Either (either) |
13 | 13 | ||
14 | import Data.Foreign (Foreign(), F()) | 14 | import Data.Foreign (Foreign()) |
15 | import Data.Foreign.Class (IsForeign, read, readProp) | 15 | import Data.Foreign.Class (IsForeign, read, readProp) |
16 | import Data.Foreign.NullOrUndefined (NullOrUndefined(..), runNullOrUndefined) | 16 | import Data.Foreign.NullOrUndefined (NullOrUndefined(..), runNullOrUndefined) |
17 | 17 | ||
18 | import Data.Maybe (Maybe(..), maybe, fromMaybe) | 18 | import Data.Maybe (Maybe(..), maybe, fromMaybe) |
19 | 19 | ||
20 | noPreludeOpt :: String | ||
20 | noPreludeOpt = "no-prelude" | 21 | noPreludeOpt = "no-prelude" |
21 | 22 | ||
23 | noOptsOpt :: String | ||
22 | noOptsOpt = "no-opts" | 24 | noOptsOpt = "no-opts" |
23 | 25 | ||
26 | noMagicDoOpt :: String | ||
24 | noMagicDoOpt = "no-magic-do" | 27 | noMagicDoOpt = "no-magic-do" |
25 | 28 | ||
29 | noTcoOpt :: String | ||
26 | noTcoOpt = "no-tco" | 30 | noTcoOpt = "no-tco" |
27 | 31 | ||
32 | verboseErrorsOpt :: String | ||
28 | verboseErrorsOpt = "verbose-errors" | 33 | verboseErrorsOpt = "verbose-errors" |
29 | 34 | ||
35 | outputOpt :: String | ||
30 | outputOpt = "output" | 36 | outputOpt = "output" |
31 | 37 | ||
38 | commentsOpt :: String | ||
32 | commentsOpt = "comments" | 39 | commentsOpt = "comments" |
33 | 40 | ||
41 | noPrefixOpt :: String | ||
34 | noPrefixOpt = "no-prefix" | 42 | noPrefixOpt = "no-prefix" |
35 | 43 | ||
44 | requirePathOpt :: String | ||
36 | requirePathOpt = "require-path" | 45 | requirePathOpt = "require-path" |
37 | 46 | ||
47 | srcOpt :: String | ||
38 | srcOpt = "src" | 48 | srcOpt = "src" |
39 | 49 | ||
50 | ffiOpt :: String | ||
40 | ffiOpt = "ffi" | 51 | ffiOpt = "ffi" |
41 | 52 | ||
42 | newtype Options | 53 | newtype Options |