Curr(y)gle is an API search engine for the functional logic programming language Curry (http://www-ps.informatik.uni-kiel.de/currywiki/). It can search for modules, functions, types and signatures. Additionally Curr(y)gle searches in description and author information. Other search restrictions cover non-deterministic or deterministic as well as rigid or flexible functions. For more information about the syntax of queries, read the how-to-search section.
Curr(y)gle uses the Holumbus framework (http://holumbus.fh-wedel.de) that specializes to build and configure highly-flexible search engines.
This directory contains a cabal-file, for the installation you simply
have to run cabal. Futhermore, Curr(y)gle depends on the Holumbus-Searchengine,
which exists as a submodule; last but not least, the Holumbus-Searchening depends
on the package haskell-src-exts
which needs happy to be installed.
$ git submodule init
$ git submodule update
$ cabal sandbox init
$ cabal install happy
$ cabal sandbox add-source holumbus
$ cabal configure
$ cabal build
$ cabal install
The installation process creates to binaries: curryIndexer and curryServer. The first creates the index for a given directory that contains at least one .cdoc-file and a corresponding uri. The .cdoc-file can be generated with the extended CurryDoc (http://www-ps.informatik.uni-kiel.de/currywiki/tools/currydoc) for a given Curry module, the uri is the corresponding HTML documentation that also can be generated with CurryDoc. This package provides an example-directory with three Curry modules generated with CurryDoc that provide some .cdoc-files. So you can generate an index with these examples and the documentation provided by PAKCS (http://www.informatik.uni-kiel.de/~pakcs/lib/CDOC/). The curryIndexer can either generate a new index or update the existing one, to distinguish between these options, you can use the flag --n for generating a new index and --u for updating the index.
$ curryIndexer ./examples/CDOC_HTML http://www.informatik.uni-kiel.de/~pakcs/lib/CDOC/ --n
$ curryIndexer ./examples/CDOC_URL http://www.informatik.uni-kiel.de/~pakcs/lib/CDOC/ --u
$ curryIndexer ./examples/CDOC_XML http://www.informatik.uni-kiel.de/~pakcs/lib/CDOC/ --u
Since it can take a very long time to add each single module, you can pass a .txt-file as argument that consists of pairs of .cdoc-file and uri to generate the index.
$ curryIndexer ./example/test.txt --n
If you have generated an index, you can run the web application on your localhost on a given port with the curryServer.
$ curryServer -p 1337
There are several identifier available to restrict your search.
- :module io - searches for modules starting with io (also :m io), without a following name, it searches for all modules
- :inModule io - restricts the search to the module io, but searches for all contexts (also :in io)
- :function map - searches for functions starting with map (also :f map), without a following name, it searches for all functions
- :type either - searches for types starting with either (also :t either), without a following name, it searches for all types
- :author donald - searches for modules with donald as author (also: __:a dona
- :nondet [name] - searches for non-deterministic functions (also :nd), a following name is optional
- :det [name] - searches for deterministic functions (also :d), a following name is optional
- :flexible [name] - searches for flexible functions (also :fl), a following name is optional
- :rigid [name] - searches for rigid functions (also :ri), a following name is optional
- :signature a - searches for signature starting with a (also :s a)
- :function map AND maybe - searches for a function starting with map and searches for maybe in all contexts (like description or signature)
- :function map maybe - does the same thing, because all parts of an query are applied by AND
- :type either OR :function either - OR can be used as binary operator
- io NOT :module io - searches for io in all contexts except for modules
- upper character, ->, tuples, lists are all identifiers to search for signatures
Have fun searching, but remember: keep calm and curry on!