flexible contexts and context reduction

Ganesh Sittampalam ganesh at earth.li
Wed Mar 26 16:52:43 EDT 2008


Hi,

I'm a bit confused about why the following program doesn't compile (in any 
of 6.6.1, 6.8.1 and 6.9.20080316). Shouldn't the Ord (a, b) context be 
reduced?

Cheers,

Ganesh

{-# LANGUAGE FlexibleContexts #-}

module Test2 where

foo :: Ord (a, b) => (a, b) -> (a, b)
foo = bar

bar :: (Ord a, Ord b) => (a, b) -> (a, b)
bar = id


More information about the Glasgow-haskell-users mailing list