Module

Control.Eff.Except

Package
purescript-effectful
Repository
the-dr-lazy/purescript-effectful

#ExceptF Source

data ExceptF :: Row Type -> Algebradata ExceptF es m a

#Except Source

type Except :: Row Type -> Row Algebra -> Row Algebratype Except es r = (except :: ExceptF es | r)

#tag Source

tag :: Proxy @Symbol "except"

#throwAs Source

throwAs :: forall tag e s es r a. Cons tag e s es => IsSymbol tag => Proxy tag -> e -> Eff ((Except es) + r) a

#throw Source

throw :: forall e es r a. e -> Eff ((Except (error :: e | es)) + r) a

#catchAs Source

catchAs :: forall tag e s es r a. Cons tag e s es => IsSymbol tag => Proxy tag -> (e -> Eff ((Except s) + r) a) -> Eff ((Except es) + r) a -> Eff ((Except s) + r) a

#catch Source

catch :: forall e s r a. (e -> Eff ((Except s) + r) a) -> Eff ((Except (error :: e | s)) + r) a -> Eff ((Except s) + r) a

#tryAs Source

tryAs :: forall tag e s es r a. Cons tag e s es => IsSymbol tag => Proxy tag -> Eff ((Except es) + r) a -> Eff ((Except s) + r) (Either e a)

#try Source

try :: forall e s r a. Eff ((Except (error :: e | s)) + r) a -> Eff ((Except s) + r) (Either e a)

#noteAs Source

noteAs :: forall tag e s es r a. Cons tag e s es => IsSymbol tag => Proxy tag -> e -> Maybe a -> Eff ((Except es) + r) a

#note Source

note :: forall e s r a. e -> Maybe a -> Eff ((Except (error :: e | s)) + r) a

#rethrowAs Source

rethrowAs :: forall tag e s es r a. Cons tag e s es => IsSymbol tag => Proxy tag -> Either e a -> Eff ((Except es) + r) a

#rethrow Source

rethrow :: forall e s r a. Either e a -> Eff ((Except (error :: e | s)) + r) a

#run Source

run :: forall r. (Eff ((Except ()) + r)) ~> (Eff r)

#foreign_mkCustomError Source

foreign_mkCustomError :: forall es. { tag :: String, value :: es } -> Error

#foreign_parseCustomError Source

foreign_parseCustomError :: forall es. { error :: Error, tag :: String } -> Nullable es

#parseCustomError Source

parseCustomError :: forall tag es. IsSymbol tag => Proxy tag -> Error -> Maybe es