On Tue, Jul 08, 2008 at 12:47:57PM +0200, Jonathan Worthington wrote:
> * Can you do .arity and .count of a signature?

There could surely be methods to provide such values.

> * Can you iterate over a signature to get each element in there?
> * If so, what sort thing thingy to you get to describe each element?  
> Some kind of parameter descriptor?

Presumably.  And the parameter presumably knows its variable name
as well as any constraints that must be evaluated at binding time.
The variable itself might also be considered one of the constraints,
since failure to bind to the variable is a kind of failure.
Most constraints can simply be smartmatched against the argument,
though variable bindings obviously have to do more work.

Parameter variables may also have individual traits, some of which
may be considered parameter traits rather than variable traits.

The structure of a signature will be pretty close to the syntax tree
for a signature and all its subrules.  Though perhaps the pre and
post constraints can be merged into a single constraint list for
each parameter.

In addition to the parameter list, a signature may also have an
"of" type.  It is not considered one of the parameters.


Reply via email to