Jonathan S. Shapiro wrote:
> QUESTION:
> 
> Because effect variables are positionally distinguished, it is not
> strictly necessary for them to have a different syntax from type
> variables. [Strictly speaking, the syntax wouldn't suffer if type
> variables did not have a leading ' either].
> 
> It may be better for clarity purposes if we restrict type variables to
> the non-extended identifier space (characters, _, and digits in the
> usual way) and then state that an effect variable must be written as
> something like:
> 
>   '%e
> 
> where the "%" indicates an effect variable. This would give preferred
> typings:
> 
>   map: ('%e fn (('%e fn ('a) 'b) (list 'a)) (list 'b))
>   id:  (pure fn ('a) 'a)
> 
> 
> Do people think that something like this would be clearer? If so, is "%"
> a good choice?

I think % is a good choice. Since effect variables are written as
'%[a-z0-9_], the % symbol can be used independently as an identifier
right?  that is, % can still be used for mod operation?

We can also consider ''a. Even though ''a has special meaning in SML
(variables that can only be instantiated to types that admit equality
comparison) I think it will not lead to any confusion since we deal with
such constraints through type classes.  We can also consider ',a.

Swaroop.

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to