g2q: G2Q allows constraint programming, via writing Haskell predicates.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

G2Q allows constraint programming, via writing Haskell predicates. A quasiquoter, g2, is provided which can take concrete arguments at runtime, and solve for unknown symbolic arguments.


[Skip to ReadMe]

Properties

Versions0.1.0.0, 0.1.0.0
Change logChangeLog.md
Dependenciesbase (==4.10.*), g2 (>=0.1.0.1 && <0.1.1.0) [details]
LicenseBSD-3-Clause
AuthorWilliam Hallahan, Anton Xue
Maintainerwilliam.hallahan@yale.edu
CategoryFormal Methods, Symbolic Computation
Source repositoryhead: git clone https://github.com/BillHallahan/G2Q.git
UploadedSun Jun 30 03:11:28 UTC 2019 by WilliamHallahan

Modules

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for g2q-0.1.0.0

[back to package description]

G2Q


About

G2Q allows constraint programming, via writing Haskell predicates. A quasiquoter, g2, is provided which can take concrete arguments at runtime, and solve for unknown symbolic arguments.

For example, to find inputs from a list xs which sum to a given number n, you can write:

sumToN :: Int -> [Int] -> IO (Maybe [Int])
sumToN = [g2| \(n :: Int) (xs :: [Int]) ->
              ?(ys :: [Int])
            |  sum ys == n
            && all (\e -> e `elem` xs) ys
            && length ys >= 1 |]