Module

Web.Router

Package
purescript-web-router
Repository
robertdp/purescript-web-router

#mkInterface Source

mkInterface :: forall i o. (Maybe i -> i -> RouterM i o Routing Resolved Unit) -> (RouterEvent i -> Effect Unit) -> DriverInterface i o -> Effect (RouterInterface o)

Re-exports from Control.Monad.Indexed.Qualified

#pure Source

pure :: forall m a x. IxApplicative m => a -> m x x a

#map Source

map :: forall f a b x y. IxFunctor f => (a -> b) -> f x y a -> f x y b

#discard Source

discard :: forall m a b x y z. IxBind m => IxDiscard a => m x y a -> (a -> m y z b) -> m x z b

#bind Source

bind :: forall m a b x y z. IxMonad m => m x y a -> (a -> m y z b) -> m x z b

#apply Source

apply :: forall m a b x y z. IxApply m => m x y (a -> b) -> m y z a -> m x z b

Re-exports from Web.Router.Internal.Control

#Routing Source

#RouterM Source

newtype RouterM :: Type -> Type -> RouterIndex -> RouterIndex -> Type -> Typenewtype RouterM i o x y a

Instances

#RouterIndex Source

#Resolved Source

#redirect Source

redirect :: forall i o. o -> RouterM i o Routing Resolved Unit

#override Source

override :: forall i o. i -> RouterM i o Routing Resolved Unit

#continue Source

continue :: forall i o. RouterM i o Routing Resolved Unit

Re-exports from Web.Router.Internal.Types

#RouterInterface Source

type RouterInterface route = { initialize :: Effect (Effect Unit), navigate :: route -> Effect Unit, redirect :: route -> Effect Unit }

#RouterEvent Source

data RouterEvent route

Constructors

Instances

#DriverInterface' Source

type DriverInterface' route = DriverInterface route route

#DriverInterface Source

type DriverInterface i o = { initialize :: (i -> Effect Unit) -> Effect (Effect Unit), navigate :: o -> Effect Unit, redirect :: o -> Effect Unit }

#isRouting Source

isRouting :: forall route. RouterEvent route -> Boolean

#isResolved Source

isResolved :: forall route. RouterEvent route -> Boolean

#_Routing Source

_Routing :: forall route. Prism' (RouterEvent route) route

#_RouterEvent Source

_RouterEvent :: forall route. Lens' (RouterEvent route) route

#_Resolved Source

_Resolved :: forall route. Prism' (RouterEvent route) route