[bitc-dev] constraining bitc's type system

Jonathan S. Shapiro shap at eros-os.org
Fri Sep 15 14:56:10 CDT 2006


On Fri, 2006-09-15 at 15:40 -0400, Swaroop Sridhar wrote:
> Sam Mason wrote:
> > Just been reading though the BitC spec again and trying to understand
> > Swaroop's latest mails and noticed that the definition of the "optional"
> > union type looks a bit strange.  It currently appears as:
> > 
> >   (defunion (optional 'a) :val
> >     none
> >     val:(some 'a))
> > 
> > But I think it's probably:
> > 
> >   (defunion (optional 'a) :val
> >     none
> >     (some val:'a))
> 
> Yes. Thanks for the correction. Also, val is a keyword and cannot be 
> used as a field name. So, the correct definition is:
> 
> (defunion (optional 'a):val  none (some it:'a))

Swaroop: can you fix this in the spec?



shap



More information about the bitc-dev mailing list