On Tue, Aug 10, 2010 at 7:01 PM, Jonathan S. Shapiro <s...@eros-os.org>wrote:

> The full production for function types is:
>
>    fntype: [effects] fn ( argType [, argType]* ) -> resultType
>

I wonder if the function type syntax should allow for other attributes which
may be added in the future, e.g. calling conventions, or to declare that a
function is executed on a gpu (in some compiler-dependent way):

f : fn 'a -> 'b
f : fn[fastcall] 'a -> 'b
f : fn[Fortran,some_other_attribute] 'a -> 'b
f : fn[gpu] 'a -> 'b

(Are the brackets of any actual benefit in these examples?)

See also

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html


Chris
_______________________________________________
bitc-dev mailing list
bitc-dev@coyotos.org
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to