So first, yes, there is an error in TY_ARRAY. It should be "| TY_ARRAY of type literal"
But even as written it would not allow "literal literal", because "literal" does not contain TY_ARRAY. The syntax "|TY_ARRAY of literal" creates a type constructor that has arguments. Think TY_ARRAY(type /* element type */, literal /* index type */). On Thu, Sep 4, 2014 at 2:31 PM, Jon Zeppieri <[email protected]> wrote: > since that would allow: > > literal literal > > but `literal` is a nullary type constructor. > literal is a type, but it has no value constructor. There are no instances of *literal*, only instances of its constituents. *literal* is a name being given to a union type (as opposed to a sum type). The example might be clearer if the language had an ANY type, but for the moment it doesn't. That leaves me shoehorning "oneof" into the sum type declaration syntax, with the result that we can only form unions out of the leg types of sums (because those have discriminators). shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
