summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc232.hs
blob: 2fc8544ab3c948b9302efb8c8264784f80850fcb (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
28
{-# LANGUAGE FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}

-- This one fixed 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 }