blob: ef458e1ff5e7d0c9a7149d80dee1428889a512f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
-- #1781
-- This one should really succeed, because 'plus' can only
-- be called with a = Int->Int, but the old fundep story
-- certainly made it fail, and so that's what we expect for now
-- We may become more liberal later
module ShouldCompile where
class E a b | a -> b, b -> a
instance E a a
plus :: (E a (Int -> Int)) => Int -> a
plus x y = x + y
|