[mercury-users] Brokenness with unique modes and impure lambda expressions

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Aug 3 17:55:57 AEST 2005

On Wed, 3 Aug 2005, Peter Hawkins wrote:

> Hi...
> Why doesn't this work?
Because the compiler is generating an internal representation for
the lambda expression 'F' in get_closure that breaks its own
purity rules.

I'm working on a fix for this.

> :- func get_closure =     ((impure pred(io.state,
> io.state))::out(pred(di, uo) is det)) is det.
> get_closure = F :-
>     promise_pure (
>         F = (impure pred(IO0::di, IO::uo) is det :-
>             impure call(g_fn, IO0, IO))
>     ).

Why is this unification in a promise_pure scope?

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