[mercury-users] foreign_type
Peter Ross
pro at missioncriticalit.com
Mon Jun 3 18:53:02 AEST 2002
michael wrote:
>
> > Also, foreign types have to be of arity 0. Is this really necessary?
It
> > would be nice to be able to define foo(T) and implement it as a
foreign
> > type where the T is unused and exists only to enforce certain
constraints
> > elsewhere in the code (separating point(global) vs. point(local) for
> > example).
>
> And you can't do this either:
>
> :- type foo(T) == foo.
> :- type foo.
>
> :- pragma foreign_type(c, foo ...)
>
but you should be able to do this.
:- type constrained_foo(T)
---> foo(foo).
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list