Commit 479a9227 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #2247

parent 7f823a0d
{-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses, UndecidableInstances, FlexibleInstances #-}
module T2247 where
class FD a b | a -> b
instance CFD a b => FD a b
class {- FD a b => -} CFD a b
instance CFD Bool Char
instance CFD Bool Bool
f' :: FD Bool Bool => Bool
f' = True
g' :: FD Bool Char => Bool
g' = False
x = f'
T2247.hs:6:10:
Illegal instance declaration for `FD a b'
Multiple uses of this instance may be inconsistent
with the functional dependencies of the class.
In the instance declaration for `FD a b'
......@@ -293,3 +293,4 @@ test('T7525', normal, compile_fail, [''])
test('T7368a', normal, compile_fail, [''])
test('T7545', normal, compile_fail, [''])
test('T7279', normal, compile_fail, [''])
test('T2247', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment