<div class="gmail_quote">On 14 April 2012 19:32, Michael Richter <span dir="ltr"><<a href="mailto:ttmrichter@gmail.com">ttmrichter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On 14 April 2012 19:21, Ian MacLarty <span dir="ltr"><<a href="mailto:maclarty@csse.unimelb.edu.au" target="_blank">maclarty@csse.unimelb.edu.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>> You can also do something like this:<br></div></div></blockquote></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="im">
Foo ^ bar = 10,<br>
Foo ^ baz = "eleven",<br>
Foo ^ quux = yes,<br></div></blockquote><div><br></div><div>OK, I … am duly chastened. I hadn't even thought of doing it that way. I was constantly messing with :=.</div></div></blockquote><div><br></div><div>OK, I'm still lost, I'm afraid. Given this type declaration:</div>
<div><br></div><div><font face="'courier new', monospace">:- type foo(bar::int, baz::string, quux::bool).</font></div><div><br></div><div>How would I instantiate this using the system you show?</div><div><br></div>
<div><font face="'courier new', monospace">:- func default_instance = (foo::out) is det.</font></div><div><font face="'courier new', monospace">default_instance = <what code do I put here?> </font></div>
</div><div><br></div><div>I've tried a few ways to do this, with = or :=, explicitly naming the return variable and separating it from the instantiation code with :- (and a few other more desperate attempts) and I'm just not having any luck.</div>
<div><br></div>-- <br>"Perhaps people don't believe this, but throughout all of the discussions of entering China our focus has really been what's best for the Chinese people. It's not been about our revenue or profit or whatnot."<br>
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.<br>