[cap-talk] Haskell @inert-like construct
Sandro Magi
naasking at higherlogics.com
Wed Sep 3 08:23:23 CDT 2008
Toby Murray wrote:
> On Tue, 2008-09-02 at 17:40 -0700, Tyler Close wrote:
>> interface Exporter {
>> String run(@inert Object x);
>> }
>>
>> static public String
>> encode(final Exporter export, final @inert ConstArray<?> values);
>>
>> The encode() method generates a JSON text that represents the
>> immutable parts of the object tree reachable from the values argument.
> [...]
> Does the encode() method being functionally pure not guarantee these
> properties?
encode() induces side-effects via the Exporter I believe, so it isn't
functionally pure. At best, encode() is parametric in the effect induced
by calling Exporter.run().
Sandro
More information about the cap-talk
mailing list