diff --git a/bower.json b/bower.json index 8528986..fe54bdd 100644 --- a/bower.json +++ b/bower.json @@ -16,7 +16,7 @@ "!src/**/*" ], "dependencies": { - "purescript-profunctor-lenses": "^2.1.0", - "purescript-react": "^2.0.0" + "purescript-profunctor-lenses": "^3.2.0", + "purescript-react": "^3.0.0" } } diff --git a/src/React/Redux.purs b/src/React/Redux.purs index 50b7b8e..d59cc4f 100644 --- a/src/React/Redux.purs +++ b/src/React/Redux.purs @@ -34,20 +34,16 @@ module React.Redux , fromEnhancerForeign ) where -import Prelude (Unit, (>>=), (<<<), const, pure, id, unit) - -import Control.Monad.Eff (Eff) +import React as React +import Control.Monad.Eff (Eff, kind Effect) import Control.Monad.Eff.Class (class MonadEff, liftEff) - import Data.Either (Either, either) import Data.Function.Uncurried (Fn2, Fn3, runFn2, runFn3) import Data.Lens (Getter', Lens', Prism', matching, set, to, view) import Data.Tuple (Tuple(..), fst) - +import Prelude (Unit, (>>=), (<<<), const, pure, id, unit) import Unsafe.Coerce (unsafeCoerce) -import React as React - type ReduxReactClass' state props = ReduxReactClass state Unit props type Reducer action state = action -> state -> state @@ -165,11 +161,11 @@ reducerOptic lens prism k action state = either (const state) (\a -> set lens (k action' :: Either action action' action' = matching prism action -foreign import data REDUX :: ! +foreign import data REDUX :: Effect -foreign import data Store :: * -> * -> * +foreign import data Store :: Type -> Type -> Type -foreign import data ReduxReactClass :: * -> * -> * -> * +foreign import data ReduxReactClass :: Type -> Type -> Type -> Type foreign import connect_ :: forall state props props'. Fn3 (state -> props -> Tuple state props) (Tuple state props -> props') (React.ReactClass props') (ReduxReactClass state props props')