On Thu, 12 Mar 1998, Koen Claessen wrote:

> Sadly, this example shows that Haskell 1.4 does not have a principal
> typing property. Your function has the type
> 
>   all' :: Eq a => (a -> Bool) -> [a] -> Bool
>    
> As well as:
> 
>   all' :: Eq a => (a -> Bool) -> F a -> Bool
> 
> (for a suitable Monad F). But Haskell is not capable of finding the one
> type that contains them all: 
> 
>   all' :: (Monad m, Eq (m a)) => (a -> Bool) -> m a -> Bool
 
What is the reason for that? It is a language design choice or is there a 
fundamental reason like, say, that allowing such things make the type
system undecidable?

m

-----------------------------------------------------------------------
Mariano Suarez Alvarez                              The introduction of
Departamento de Matematica                       numbers as coordinates
Universidad Nacional de Rosario             [...] is an act of violence
Pellegrini 250                                                  A. Weyl
2000 Rosario - Argentina                                        
e-mail: [EMAIL PROTECTED]
-----------------------------------------------------------------------



Reply via email to