Skip to content
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
1 change: 1 addition & 0 deletions Control/Monad/State/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,4 @@ instance MonadState s m => MonadState s (SelectT r m) where
instance (MonadState s m, MonadState s n) => MonadState s (Product m n) where
get = Pair get get
put s = Pair (put s) (put s)
state sas = Pair (state sas) (state sas)
3 changes: 2 additions & 1 deletion Control/Monad/Writer/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ instance
pass = Accum.liftPass pass

instance (MonadWriter w m, MonadWriter w n) => MonadWriter w (Product m n) where
tell w = Pair (tell w) (tell w)
writer aw = Pair (writer aw) (writer aw)
tell w = Pair (tell w) (tell w)
listen (Pair ma na) = Pair (listen ma) (listen na)
pass (Pair maf naf) = Pair (pass maf) (pass naf)