Malcolm Wallace wrote:
> Christian Maeder <[EMAIL PROTECTED]> writes:
>
>>>voidcast v@(VariantWithOne{}) = v { field1 = Void , field2 = Void }
>>Setting field2 only assures type correctness, but the value of field2
>>would be ignored at runtime.
>
> Exactly what I was proposing.
I know, but how "save" is this. i.e. when you mistype/exchange field
names?
> I am proposing that it should not be thought of as an error at all.
I think, it is better to get i.e. an overflow error (at runtime) than
another runtime error elsewhere.
Christian
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe