
10 Jan
2006
10 Jan
'06
2:43 p.m.
On 1/10/06, Brian Hulley
Hi - I'm wondering if there is any possiblility of getting intersection types into Haskell. For example, at the moment there is no (proper) typing for:
f g x y = (g x, g y)
Ideally, I'd like to be able to write:
f:: (a -> b & c -> d) -> a -> c -> (b,d)
I have no idea what kind of function would have type (a -> b & c -> d). Can you give an example?
f :: (a -> b a) -> c -> d -> (b c, b d)
f :: (forall a. a -> b a) -> c -> d -> (b c, b d)
--
Taral