[Haskell-cafe] Intersection types for Haskell?
Taral
taralx at gmail.com
Tue Jan 10 14:43:32 EST 2006
On 1/10/06, Brian Hulley <brianh at metamilk.com> wrote:
> 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 <taralx at gmail.com>
"Computer science is no more about computers than astronomy is about
telescopes."
-- Edsger Dijkstra
More information about the Haskell-Cafe
mailing list