Головна сторінка Груп Google
Довідка | Записатися
Допис з розмови Union/intersection types confusion (was: Re: Difficulty deriving a general type for combinator)
Група, до якої ви додаєте допис, - група Usenet. Відтак, будь-хто в Інтернеті бачитиме вашу електронну адресу.
Вашу відповідь не було надіслано.
Ваш допис було надіслано
 
Від:
Кому:
Копія:
Продолжить:
Додати копію: | Додати продовження: | Редагувати тему
Тема:
Підтвердження:
З метою підтвердження введіть символи, які ви бачите на зображенні нижче або числа, які чуєте, натиснувши значок доступу. Прослухайте і введіть цифри, що чуєте
 
Simon Richard Clarkstone  
Переглянути профіль
 Більше налаштувань 20 Вер 2008, 01:02
Групи новин: comp.lang.haskell
Від: Simon Richard Clarkstone <s.r.clarkst...@dunelm.org.uk>
Дата: Fri, 19 Sep 2008 23:02:44 +0100
Локально: Сб 20 Вер 2008 01:02
Тема: Union/intersection types confusion (was: Re: Difficulty deriving a general type for combinator)

Simon Richard Clarkstone wrote:
> Well, these particular examples could both be typed if there were
> something like "union types".  Using Java's syntax for interface unions:

> app2 :: (a -> b && c -> d) -> (a,b) -> (c,d)
> twice :: (a -> b && b -> c) -> a -> c

I worded that very badly.  "Type1 && Type2" in Java means an item from
the intersection of the sets of items of each type, which AIUI is called
an intersection type.  When I said "union", I was thinking of the set of
operations and contracts known to be present by examining the type: the
union of the sets of method signatures of the two types.

Conversely, given a union type, the set of operations and contracts
known to be present is the *intersection* of those for all the united
types.  I would guess there is a good reason for this reversal, and it
is not just a coincidence.

--
Simon Richard Clarkstone:
s.r.cl?rkst...@dunelm.org.uk / s?m?n_cl?rkst...@yahoo.co.uk
   | My half-daughter went to the GMH riots |
   | But all I got was this stupid ¥-shirt. |


Ви мусите увійти перед публікацією повідомлень.
Аби надіслати допис, будь ласка, спочатку приєднайтеся до цієї групи.
Будь ласка, поновіть своє прізвисько на сторінці налаштування передплати перед тим, як надіслати свій допис.
У вас немає права надсилання дописів до цієї групи.

Створити групу - Групи Google - Домівка Google - Правила користування послугою - Заява про конфіденційність і нерозголошення інформації
©2009 Google