summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc112.hs
blob: d588d0e698790488abda5381fabc47e0dda9958e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}

-- !!! Functional dependencies
-- This broke an early impl of functional dependencies
-- (complaint about ambiguity)

module ShouldCompile where

class C a b | a -> b where f :: a -> b

g :: (C a b, Eq b) => a -> Bool
g x = f x == f x