[mercury-users] passing higher-order modes to existentially typed data type wrappers

Ralph Becket rafe at csse.unimelb.edu.au
Mon May 7 11:31:17 AEST 2007

J?rg Roman Rudnick, Sunday,  6 May 2007:
> Dear all,
> is it OK to use unsafe 'mode casts' (in foreign code) to ensure higher 
> order modes at conversion from and to existentially typed data types?
> This seems to work so far -- thus allowing to extend the OO interface 
> analogy to preds :-) -- but are there any issues to be careful of when 
> using such 'mode casts'? Can this be done in harmony with sane execution 
> of Mercury?

As with any down-casts, you do this at your own risk.  Of course,
limitations of the current mode analysis implementation mean that mode
casts are occasionally unavoidable.
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au

More information about the users mailing list