[Haskell-cafe] ANNOUNCE: graphviz-2999.0.0.0

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun Jul 19 10:22:19 EDT 2009


On Jul 19, 2009, at 04:13 , Ivan Lazar Miljenovic wrote:
> 1. Some Attribute values take something like (Either Bool String);  
> this
>   is used when upstream indicates that two different types of values
>   are allowed.  Typically in this kind of situation, the allowed  
> String
>   values are limited to a few specific values, so the usage of Either
>   typically indicates that they should be replaced with a custom value
>   type.

Shouldn't String then be replaced by a sum type?  In fact, as  
described this would subsume the Either as well.

 > -- replace Either Bool String: AttrN are the strings, AltValue the  
bool
 > data upstreamValue = AttrA | AttrB | AltValue

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090719/7be4325b/PGP.bin


More information about the Haskell-Cafe mailing list