Ashley Yakeley writes:
> At 2000-11-24 02:02, Bernd =?iso-8859-2?Q?Holzm=FCller?= wrote:
>
>> When I got to know Haskell, I was expecting a construct for union types
>> like:
>>
>> data B = ...
>> data C = ...
>> type A = B | C | D -- A accepts values of either B or C or D (cf. the
>> "Either a
Hi Bernd,
> data B = ...
> data C = ...
> type A = B | C | D -- A accepts values of either B or C or D (cf. the
> "Either a" type in the Prelude)
What about the construction of a union type in Haskell like this?:
data B = B1 | B2
data C = C1 | C2 | C3
data D = D1 | D2
data A = UB
Fergus Henderson <[EMAIL PROTECTED]> writes:
[...]
> (2) Allow pattern matching on values of particular types,
> using `case'.
[...]
> If we allow (2), then some programming mistakes that previously
> were type errors would instead become just inexhaustive pattern
> matches for wh
At 2000-11-24 03:14, Fergus Henderson wrote:
>> Is there any reason for this restriction
>> in the Haskell type system? Does this lead to losing the principal type
>> property?
>
>If you allow (2) above, there may be serious problems for
>principal types. For example, consider
>
> f x = ca
At 2000-11-24 02:02, Bernd =?iso-8859-2?Q?Holzm=FCller?= wrote:
>When I got to know Haskell, I was expecting a construct for union types
>like:
>
> data B = ...
> data C = ...
> type A = B | C | D -- A accepts values of either B or C or D (cf. the
>"Either a" type in the Prelude)
>
>but this i
On 24-Nov-2000, Bernd Holzmüller <[EMAIL PROTECTED]> wrote:
> There is one thing I was really missing in all these projects: the
> existence of union types (i.e. the union of value sets of two existing
> data types)
Mercury has a similar type system to Haskell.
This question came up a lot during
Dear all,
We are currently advertising four new lectureships in Nottingham.
There are no particular research areas specified for these positions,
but applications in the area of the Languages and Programming research
group (http://www.cs.nott.ac.uk/Research/lap/) would be most welcome.
Graham Hu
I am about to finish my PhD, where I used the Vienna Definition Language
(VDL) to specify the semantics of some programming language constructs.
In order to verify this semantics description using a type checker and
by dynamic execution, I found and used Haskell as the language of choice
to map th