Hello Cristiano, Thursday, October 8, 2009, 7:14:20 PM, you wrote:
> Could you explain why, under NoMonomorphismRestriction, this typechecks: > let a = 1 in (a + (1 :: Int),a + (1 :: Float)) > while this not: > foo :: Num a => a -> (Int,Float) > foo k = (k + (1 :: Int), k + (1.0 :: Float)) i think it's because type is different: foo :: (forall a. (Num a) => a) -> (Int,Float) in first equation it probably inferred correctly -- Best regards, Bulat mailto:bulat.zigans...@gmail.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe