We're updating the issue view to help you get more done. 

ex* could expand macros in patterns

Description

So, tagged data structures are probably interesting in a relational context. Say you have a relation with some default logic about dogs:

1 2 3 4 5 6 7 (defna friendlyo [Dog-Or-Breed] ([:Spot] succeed) ([:Spike] fail) ([Other-Dog] (fresh [Breed] (dog-breed Other-Dog Breed) (friendlyo Breed))) ([(breed :miniature-dachshund)] fail) ([(breed :golden-retriever)] succeed) ;. . .)

Assume there's a (defmacro breed [t] `[:breed ~t]).

That's nicer than having to drop [:breed :golden-retriever] in there or whatever, since it's compile-time-checkable, less error-prone, reduces duplication, etc.

This little patch makes ex* expand macros in patterns so it doesn't treat e.g. (breed :golden-retriever) as introducing a new LVar called "breed". Test also provided.

Environment

None

Status

Assignee

David Nolen

Reporter

import

Labels

None

Approval

None

Patch

Code and Test

Priority

Minor