summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc115.hs
blob: 139b3a53232b46a55129fd9e5abf19c7e242cbd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
             FlexibleInstances #-}
-- !!! Functional dependencies
-- This broke an early impl of functional dependencies
-- (complaining about ambiguity)

module ShouldCompile where

class Foo r a | r -> a where
    foo :: r -> a

instance Foo [m a] (m a)

bad:: Monad m => m a
bad = foo bar

bar:: Monad m => [m a]
bar = []