core.logic

add fne, anonymous version of defne

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Activity

Hide
Stanislas Nanchen added a comment -

The macros 'fnm' (and fn[eau]) use the optional argument :tabled after the argument list. Is it ok?

Show
Stanislas Nanchen added a comment - The macros 'fnm' (and fn[eau]) use the optional argument :tabled after the argument list. Is it ok?
Hide
David Nolen added a comment - - edited

tabling passed as an option is OK with me.

Also could we get tests? Thanks much!

Show
David Nolen added a comment - - edited tabling passed as an option is OK with me. Also could we get tests? Thanks much!
Hide
Stanislas Nanchen added a comment -

I've used the existing pm tests to test the fne macro. you find it in the logic-80-2.patch. Is it what you had in mind?

It is not clear how I can test for tabled anonymous functions as the :tabled metadata is of the defn[x] vars.
Possibilities would be:

  • add meta-data to the function produced by the macro 'tabled';
  • let the function produced by tabled implement some interface/protocol.

what do you think?

Show
Stanislas Nanchen added a comment - I've used the existing pm tests to test the fne macro. you find it in the logic-80-2.patch. Is it what you had in mind? It is not clear how I can test for tabled anonymous functions as the :tabled metadata is of the defn[x] vars. Possibilities would be:
  • add meta-data to the function produced by the macro 'tabled';
  • let the function produced by tabled implement some interface/protocol.
what do you think?
Hide
David Nolen added a comment -

This looks good. Two things:

  • squashed patch
  • tabled anonymous goal patch
Show
David Nolen added a comment - This looks good. Two things:
  • squashed patch
  • tabled anonymous goal patch
Hide
Stanislas Nanchen added a comment -

we're almost there

i do not understand what you mean. you prefer a separate patch for tabled anonymous goal?

Show
Stanislas Nanchen added a comment - we're almost there i do not understand what you mean. you prefer a separate patch for tabled anonymous goal?
Hide
David Nolen added a comment -

Sorry typo, I meant a test for the tabled anonymous goal. Thanks!

Show
David Nolen added a comment - Sorry typo, I meant a test for the tabled anonymous goal. Thanks!
Hide
Stanislas Nanchen added a comment -

thanks, i'll do it asap.

Show
Stanislas Nanchen added a comment - thanks, i'll do it asap.
Hide
Stanislas Nanchen added a comment -

Squashed Patch with tests for the fn[e] macros, normal and tabled.

Show
Stanislas Nanchen added a comment - Squashed Patch with tests for the fn[e] macros, normal and tabled.
Hide
Stanislas Nanchen added a comment -

so i finally got some time to look at it again. the patch is squashed and contains a test for the tabled anonymous goals; it just tests whether the macro code actually works.

Show
Stanislas Nanchen added a comment - so i finally got some time to look at it again. the patch is squashed and contains a test for the tabled anonymous goals; it just tests whether the macro code actually works.
Hide
David Nolen added a comment -

Thanks will take a look!

Show
David Nolen added a comment - Thanks will take a look!

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: