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

David Nolen made changes -
Field Original Value New Value
Priority Major [ 3 ] Minor [ 4 ]
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?
Stanislas Nanchen made changes -
Attachment logic-80.patch [ 11978 ]
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?
Stanislas Nanchen made changes -
Attachment logic-80-2.patch [ 11984 ]
Stanislas Nanchen made changes -
Attachment logic-80.patch [ 11978 ]
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.
Stanislas Nanchen made changes -
Attachment logic-80-3.patch [ 11991 ]
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.
Stanislas Nanchen made changes -
Attachment logic-80-2.patch [ 11984 ]
Hide
David Nolen added a comment -

Thanks will take a look!

Show
David Nolen added a comment - Thanks will take a look!
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: