Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eac9f2c

Browse files
committed
added: tell
1 parent f481c68 commit eac9f2c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎WriterT.hs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
12
module WriterT where
23

3-
import Control.Monad.Trans
44
import Control.Monad
5+
import Control.Monad.Trans
56
import Control.Monad.Writer
67
import Data.Monoid
78

@@ -27,5 +28,5 @@ instance Monoid w => MonadTrans (MyWriterT w) where
2728
return (a,mempty)
2829

2930

30-
--tell :: w -> MyWriterT ((),w)
31-
tell w = MyWriterT $ return ((),w)
31+
instance (Monoidw, Monadm) =>MonadWriterw (MyWriterTwm) where
32+
tell w = MyWriterT $ return ((),w)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /