tc109.hs 380 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# OPTIONS -fglasgow-exts #-}

module ShouldCompile

-- This accepted by Hugs, but not by GHC 4.08.1
-- Reported by Thomas Hallgren Nov 00

class P a
class R a b | b->a

instance (P a,R a b) => P b

{- GHC 4.08.1 doesn't seem to allow variables in the context that
don't appear after the =>, but which are still ok since they are
determined by the functional dependenices.  -}