[Hugs-users] wrong infered types?
Paqui Lucio
paqui.lucio at ehu.es
Fri Jan 11 10:49:26 EST 2008
Hi,
In Hugs, the infered types for the following four functions:
f a = let m = id a in do return m
f' a = do m <- id a
return m
g a = let m =[a,a] in do return m
g' a = do m <- [a,a]
return m
respectively are
f :: Monad a => b -> a b
f' :: Monad a => a b -> a b
g :: Monad a => b -> a [b]
g' :: a -> [a]
I didn't expect this types, do you?
Anybody has some explanation?
Thanks in advance,
Paqui
---------------------------------
Paqui Lucio
Dpto de LSI
Facultad de Informática
Paseo Manuel de Lardizabal, 1
20080-San Sebastián
SPAIN
---------------------------------
e-mail: paqui.lucio at ehu.es
Tfn: (+34) (9)43 015049
Fax: (+34) (9)43 015590
Web: http://www.sc.ehu.es/paqui
---------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/hugs-users/attachments/20080111/9131315c/attachment.htm
More information about the Hugs-Users
mailing list