summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc232.hs
blob: 0e6450b066b0d46f46ff0dc44b005583eb3a1a40 (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
26
27
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}

-- This one foxed the constraint solver (Lint error)
-- See Trac #1494

module ShouldCompile where

import Control.Monad.State

newtype L m r = L (StateT Int m r)

instance Functor (L m) where
  fmap = undefined

instance Applicative (L m) where
  pure  = undefined
  (<*>) = undefined

instance Monad m => Monad (L m) where
  (>>=)  = undefined
  return = undefined

zork :: (Monad m) => a -> L m ()
zork = undefined

mumble e = do { modify id; zork e }