Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

analytics

Build Status

This is a work-in progress project for working with declarative Datalog style programs as an embedded domain-specific language in Haskell.

The current focus is on getting a rich Datalog-esque EDSL that works nicely as a monad transformer, so you can mix and match it with tools from other domains.

Skim the examples folder to get started for now.

Using X, Y and Z as Node variables, and A B and C as Node entities:

test :: Datalog [Edge]
test = do
  edge A B
  edge B C
  edge B A
  tc X Y :- edge X Y
  tc X Z :- tc X Y <* edge Y Z
  query $ row (tc A X) <* no (edge X C)

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell-lens IRC channel on irc.freenode.net.

-Edward Kmett

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.