diff options
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r-- | testsuite/tests/deriving/should_fail/T3621.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_fail/T3621.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_run/drvrun019.hs | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/testsuite/tests/deriving/should_fail/T3621.hs b/testsuite/tests/deriving/should_fail/T3621.hs index cd574eab81..36ac195f2b 100644 --- a/testsuite/tests/deriving/should_fail/T3621.hs +++ b/testsuite/tests/deriving/should_fail/T3621.hs @@ -14,11 +14,13 @@ newtype T = MkT S deriving( C a ) class (Monad m) => MonadState s m | m -> s where newtype State s a = State { runState :: s -> (a, s) } +instance Functor (State s) where {} +instance Applicative (State s) where {} instance Monad (State s) where {} instance MonadState s (State s) where {} newtype WrappedState s a = WS { runWS :: State s a } - deriving (Monad, MonadState state) + deriving (Functor, Applicative, Monad, MonadState state) -- deriving (Monad) deriving instance (MonadState state (State s)) diff --git a/testsuite/tests/deriving/should_fail/T3621.stderr b/testsuite/tests/deriving/should_fail/T3621.stderr index b70fc33bda..67b949e754 100644 --- a/testsuite/tests/deriving/should_fail/T3621.stderr +++ b/testsuite/tests/deriving/should_fail/T3621.stderr @@ -1,5 +1,5 @@ -T3621.hs:21:21: +T3621.hs:23:43: No instance for (MonadState state (State s)) arising from the 'deriving' clause of a data type declaration Possible fix: diff --git a/testsuite/tests/deriving/should_run/drvrun019.hs b/testsuite/tests/deriving/should_run/drvrun019.hs index 3fd8ccf025..663fb38cd4 100644 --- a/testsuite/tests/deriving/should_run/drvrun019.hs +++ b/testsuite/tests/deriving/should_run/drvrun019.hs @@ -6,7 +6,7 @@ module Main where
newtype Wrap m a = Wrap { unWrap :: m a }
- deriving (Monad, Eq)
+ deriving (Functor, Applicative, Monad, Eq)
foo :: Int -> Wrap IO a -> Wrap IO ()
foo 0 a = return ()
|