diff --git a/bower.json b/bower.json index e6b92e4..642087d 100644 --- a/bower.json +++ b/bower.json @@ -21,13 +21,13 @@ "package.json" ], "dependencies": { - "purescript-eff": "1.0.0", - "purescript-generics": "1.0.0", - "purescript-argonaut-codecs": "1.0.0" + "purescript-eff": "2.0.0", + "purescript-generics": "3.1.0", + "purescript-argonaut-codecs": "2.0.0" }, "devDependencies": { - "purescript-console": "1.0.0", - "purescript-spec": "0.8.0" + "purescript-console": "2.0.0", + "purescript-spec": "0.10.0" }, "version": "0.2.1" } diff --git a/src/Electron/Options.purs b/src/Electron/Options.purs index acdf80e..2ddfcdc 100644 --- a/src/Electron/Options.purs +++ b/src/Electron/Options.purs @@ -2,15 +2,15 @@ module Electron.Options ( encodeOptions ) where -import Prelude ((+), (>>>), unit, (#), map) +import Data.StrMap as M import Data.Argonaut.Core (Json) import Data.Argonaut.Encode (encodeJson, gEncodeJson') import Data.Foldable (foldl) import Data.Generic (class Generic, GenericSpine(SArray, SProd), toSpine) import Data.Maybe (Maybe(Just)) import Data.Monoid ((<>)) -import Data.String (drop, lastIndexOf, take, toLower) -import Data.StrMap as M +import Data.String (Pattern(Pattern), drop, lastIndexOf, take, toLower) +import Prelude ((+), (>>>), unit, (#), map) encodeOptions :: forall a. (Generic a) => Array a -> Json encodeOptions = map toSpine >>> encodeOptions' @@ -32,6 +32,6 @@ toCamelCase s = toLower (take 1 s) <> drop 1 s simpleName :: String -> String simpleName qname = - case lastIndexOf "." qname of + case lastIndexOf (Pattern ".") qname of Just index -> drop (index + 1) qname _ -> qname