[mercury-users] io__error

Michael Day mikeday at yeslogic.com
Thu Aug 1 11:49:06 AEST 2002

> Maybe you mean providing a constructor function to
> allow users to construct their own values of type `io__error'?
> That might be useful.

This would be good, as it would allow user functions to return io__res,
rather than creating a new result type every time.

> 	:- type io__res(T) --->
> 			ok(T)
> 		;	some [E] error(E) <= err_msg(E).
> then this is basically equivalent to just using `string' instead of
> `io__error' -- again this would fail to meet the design goal of
> being extensible in a backwards-compatible way.

You could add methods to the typeclass without disturbing existing code
that only called err_msg, couldn't you?


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