aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoreric thul <thul.eric@gmail.com>2015-12-20 22:11:16 -0500
committereric thul <thul.eric@gmail.com>2015-12-20 22:11:16 -0500
commit2e2da2be94720a739c595ec179a7ed49480ce753 (patch)
tree9b1b4763ca5e05d9211fec771df09ec29fb9fb34
parent94cc1cdd03b9c2115813a698b1e4337bce894321 (diff)
downloadpurs-loader-2e2da2be94720a739c595ec179a7ed49480ce753.tar.gz
purs-loader-2e2da2be94720a739c595ec179a7ed49480ce753.tar.zst
purs-loader-2e2da2be94720a739c595ec179a7ed49480ce753.zip
Fixing compiler warnings
-rw-r--r--package.json10
-rw-r--r--src/PursLoader/Loader.purs8
-rw-r--r--src/PursLoader/LoaderUtil.purs2
-rw-r--r--src/PursLoader/Options.purs15
4 files changed, 25 insertions, 10 deletions
diff --git a/package.json b/package.json
index b1ae011..0080d32 100644
--- a/package.json
+++ b/package.json
@@ -10,11 +10,11 @@
10 }, 10 },
11 "scripts": { 11 "scripts": {
12 "build": "npm run-script build:compile && npm run-script build:docs && npm run-script build:package", 12 "build": "npm run-script build:compile && npm run-script build:docs && npm run-script build:package",
13 "build:compile": "./node_modules/.bin/pulp build -o build", 13 "build:compile": "pulp build -o build",
14 "build:docs": "./node_modules/.bin/pulp docs", 14 "build:docs": "pulp docs",
15 "build:package": "./node_modules/.bin/webpack --progress --colors --profile --bail", 15 "build:package": "webpack --progress --colors --profile --bail",
16 "build:watch": "./node_modules/.bin/pulp -w build -o build", 16 "build:watch": "pulp -w build -o build",
17 "build:json": "./node_modules/.bin/webpack --progress --colors --profile --bail --json > index.json", 17 "build:json": "webpack --progress --colors --profile --bail --json > index.json",
18 "prepublish": "npm run-script build" 18 "prepublish": "npm run-script build"
19 }, 19 },
20 "files": [ 20 "files": [
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
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
5import Data.Foreign (Foreign()) 5import Data.Foreign (Foreign())
6 6
7import PursLoader.LoaderRef (LoaderRef())
8
9foreign import parseQuery :: String -> Foreign 7foreign 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
9import Prelude (Unit(), (<>), (<$>), (<<<), (++), (<*>), ($), const, id) 9import Prelude ((<>), (<$>), (<<<), (++), (<*>), ($), const, id)
10 10
11import Data.Array (concat) 11import Data.Array (concat)
12import Data.Either (either) 12import Data.Either (either)
13 13
14import Data.Foreign (Foreign(), F()) 14import Data.Foreign (Foreign())
15import Data.Foreign.Class (IsForeign, read, readProp) 15import Data.Foreign.Class (IsForeign, read, readProp)
16import Data.Foreign.NullOrUndefined (NullOrUndefined(..), runNullOrUndefined) 16import Data.Foreign.NullOrUndefined (NullOrUndefined(..), runNullOrUndefined)
17 17
18import Data.Maybe (Maybe(..), maybe, fromMaybe) 18import Data.Maybe (Maybe(..), maybe, fromMaybe)
19 19
20noPreludeOpt :: String
20noPreludeOpt = "no-prelude" 21noPreludeOpt = "no-prelude"
21 22
23noOptsOpt :: String
22noOptsOpt = "no-opts" 24noOptsOpt = "no-opts"
23 25
26noMagicDoOpt :: String
24noMagicDoOpt = "no-magic-do" 27noMagicDoOpt = "no-magic-do"
25 28
29noTcoOpt :: String
26noTcoOpt = "no-tco" 30noTcoOpt = "no-tco"
27 31
32verboseErrorsOpt :: String
28verboseErrorsOpt = "verbose-errors" 33verboseErrorsOpt = "verbose-errors"
29 34
35outputOpt :: String
30outputOpt = "output" 36outputOpt = "output"
31 37
38commentsOpt :: String
32commentsOpt = "comments" 39commentsOpt = "comments"
33 40
41noPrefixOpt :: String
34noPrefixOpt = "no-prefix" 42noPrefixOpt = "no-prefix"
35 43
44requirePathOpt :: String
36requirePathOpt = "require-path" 45requirePathOpt = "require-path"
37 46
47srcOpt :: String
38srcOpt = "src" 48srcOpt = "src"
39 49
50ffiOpt :: String
40ffiOpt = "ffi" 51ffiOpt = "ffi"
41 52
42newtype Options 53newtype Options