Skip to content

updates for purescript-0.11 #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
16 changes: 6 additions & 10 deletions src/React/Redux.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')

Expand Down