A DSL for GRACeFUL components.
GenericLibrary
requires MiniZinc. We provide installation instructions for
Linux and macOS.
Patrik has provided an install script for Linux.
-
Download and install the complete MiniZinc distribution from the MiniZinc page.
-
The MiniZinc binaries will now be located under
/Applications/MiniZincIDE.app/Contents/Resources
. Add this directory to your path, like so:export PATH='$PATH:/Applications/MiniZincIDE.app/Contents/Resources'
Create a new sandbox and install the required dependencies.
cabal sandbox init
cabal install --dependencies-only
Build and execute using
cabal build
cabal run examples
Stack will automatically take care of dependencies. Build and execute using
stack build
stack exec examples
Copy executables to ~/.local/bin
(put them on PATH) with
stack install
The executables will then be available from the command line. For example
example
Run entire test suite with
stack test
Load test modules in ghci by
stack ghci GenericLibrary:test:test
Run test suite for a single module with
stack runghc test/TestModule.hs
This assumes there is a main function in TestModule.hs.
Run haddock to generate project documentation
stack haddock --haddock-arguments --hyperlink-source
To open the documentation directly append --open
.
Find the path to the documentation by running
stack path --local-doc-root