summaryrefslogtreecommitdiff
path: root/testsuite/tests/module/mod133.hs
blob: f947a9aa950f91c8ccdf8d717eed4c112ada27da (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
-- Control.Monad re-exports Control.Monad.Fail.
-- 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

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 MonadFail Foo where
         fail = undefined