blob: ffd117bc4c4205f18853c218fe9c5767d7db2f12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{-# LANGUAGE TypeFamilies, FunctionalDependencies, RankNTypes, MultiParamTypeClasses #-}
module T4254b where
class FD a b | a -> b where
op :: a -> b;
op = undefined
instance FD Int Bool
fails :: forall a b. (a~Int,FD a b) => a -> Bool
fails = op
-- Could fail: no proof that b~Bool
-- But can also succeed; it's not a *wanted* constraint
|