Skip to content
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

add derive newtype instance for MonadThrow and MonadError #8

Merged
merged 1 commit into from
Sep 2, 2021
Merged
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
3 changes: 3 additions & 0 deletions src/Halogen/Store/Monad.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Halogen.Store.Monad where

import Prelude

import Control.Monad.Error.Class (class MonadError, class MonadThrow)
import Control.Monad.Reader (class MonadAsk, ReaderT, ask, lift, runReaderT)
import Data.Foldable (traverse_)
import Data.Maybe (Maybe(..))
Expand Down Expand Up @@ -53,6 +54,8 @@ derive newtype instance monadStoreT :: Monad m => Monad (StoreT a s m)
derive newtype instance monadAskStoreT :: Monad m => MonadAsk (HalogenStore a s) (StoreT a s m)
derive newtype instance monadEffectStoreT :: MonadEffect m => MonadEffect (StoreT a s m)
derive newtype instance monadAffStoreT :: MonadAff m => MonadAff (StoreT a s m)
derive newtype instance monadThrowStoreT :: MonadThrow e m => MonadThrow e (StoreT a s m)
derive newtype instance monadErrorStoreT :: MonadError e m => MonadError e (StoreT a s m)

instance monadStoreStoreT :: MonadAff m => MonadStore a s (StoreT a s m) where
getStore = StoreT do
Expand Down