summaryrefslogtreecommitdiff
path: root/testsuite/tests/module/mod133.hs
blob: f56ec1d02de61f868b81e15c8209070d1bee9181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- Control.Monad.Except re-exports Control.Monad.Fix.
-- This test checks that the subordinate-name test
-- for a class operation (when renaming the instance decl)
-- works correctly.

module ShouldCompile where

import Control.Monad
import Control.Monad.Except

data Foo a = Foo a

instance Functor Foo where
  fmap = liftM

instance Applicative Foo where
  pure = Foo
  (<*>) = ap

instance Monad Foo where
  return         = pure
  (Foo a) >>= k  = k a

instance MonadFix Foo where
         mfix = undefined