[Haskell-cafe] Function Types
Tim Chevalier
catamorphism at gmail.com
Mon Oct 22 22:45:51 EDT 2007
On 10/22/07, PR Stanley <prstanley at ntlworld.com> wrote:
> f x = x
> x :: a
> f x :: b
> therefore f :: a -> b
> x = a and x = b
> therefore a = b
> therefore f :: a -> a
> Simple mappings are easy to work out. It's the more detailed stuff
> I'm not sure about.
> f g x y = g x (y x)
>
Benjamin Pierce's _Types and Programming Languages_ has some good
chapters on type inference.
Cheers,
Tim
--
Tim Chevalier * catamorphism.org * Often in error, never in doubt
"Ever wonder why 'bus error core dump' is the standard C program crap
out? Because C freely hands out random pointers to anyone that asks.
Slut." -- Olin Shivers
More information about the Haskell-Cafe
mailing list