Comments (7)
Hmm, maybe I take this back… the parser accepts parens for rule invocation, but it looks like the convention of using parens is only at invokation and not at declaration.
from datomisca.
yes that's what I understand from my really poor knowledge of Clojure!
from datomisca.
For rule invocations within rule declarations,
[
[[rule ?a ?c]
[?a :ns/attr ?b]
(rule ?b c)]
]
is required.
Maybe there’s a easy change to the parser combinators to allow either parens or brackets for rules.
from datomisca.
I'll look at it!
On Fri, Feb 22, 2013 at 4:13 PM, Daniel James [email protected]:
For rule invocations within rule declarations,
[
[[rule ?a ?c]
[?a :ns/attr ?b](rule ?b c)]]is required.
Maybe there’s a easy change to the parser combinators to allow either
parens or brackets for rules.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-13947712.
from datomisca.
Daniel can you look at the test I added because it seems to work already...
from datomisca.
You’ve tested rules of the sort:
[[[rule ?a ?c]
[?a :ns/attr ?b]
(rule ?b c)]]
but I don’t think it accepts
[[(rule ?a ?c)
[?a :ns/attr ?b]
(rule ?b c)]]
I can’t find anything concrete, but it seems most people write the former, but I don’t think the latter is wrong, and nor is:
[[[rule ?a ?c]
[?a :ns/attr ?b]
[rule ?b c]]]
So the first is accepted, are there tests for the second two?
from datomisca.
Ok I see now what you mean!
I'm going to correct this ;)
from datomisca.
Related Issues (20)
- Query parser breaks on Clojure method invocation HOT 3
- Consistency bug in resolveEntity HOT 1
- implicit Datomic.database is potentially dangerous magic HOT 1
- DSet isn't good to preserve data sequence order in datasources HOT 7
- implicits for DatomicDataToArgs should be in implicit scope HOT 1
- SchemaEntity.add only supports DId
- SBinary style for Reader/Writer HOT 9
- Fully traverse the schema map with SchemaManger HOT 1
- google group is readonly HOT 3
- Problem with SchemaType.instant and Cardinality.many HOT 3
- Missing support for Database.attribute method HOT 1
- Missing support for Database.invoke
- Missing support for Entity.db
- Use () for defs with side effects
- Missing support for syncExcise, syncIndex, and syncSchema for Connection
- Investigate using extensible string interpolation for the query macro
- Deprecate or remove stream interface to TxReportQueue
- NullPointerException where mapped class references same class HOT 8
- Construct new versioning scheme HOT 1
- Getting started guide refers to unknown variable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datomisca.