[Haskell-cafe] why are implicit types different? (cleanup)

S. Alexander Jacobson alex at alexjacobson.com
Tue Nov 21 14:28:07 EST 2006

Why do g and g' have different types?

   g x y = let ?f = \x-> x in ?f x ++ (show (?f y))
   g  :: [Char] -> [Char] -> [Char]

   g' :: (Show t) => [Char] -> t -> [Char]
   g' x y = let f = \x-> x in f x ++ (show (f y))

Is there a way I can use implicit types and let g be as general as g'?


S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com

More information about the Haskell-Cafe mailing list