README.md

forsyde-shallow-examples

Installation

The example applications are provided as extensions to the ForSyDe.Shallow library, and can be imported or run in a ghci session. Please make sure you acquire ForSyDe-Shallow prior to installing the examples.

To install the applications globaly, you need to have installed ForSyDe-Shallow globally. Then, using the Cabal package manager, you can type in:

cabal update # updates the cabal repositories information
cabal install # installs 'forsyde-shallow-examples' and all its dependencies globally
ghci # opens a GHC interpreter session from which you can import the applications

To install the applications locally in a sandbox, you still need to acquire the ForSyDe-Shallow source project, but it does not need to be installed. You can use the following commands:

cabal update # updates the latest repositories information
cabal sandbox init # creates a sandbox in the current folder
cabal install # installs 'forsyde-shallow-examples' and all its dependencies locally, in the sandbox
cabal repl # opens a GHC interpreter session for the sandbox from which you can import the applications

Each application is documented in-line using Haddock style comments. You are strongly advised to compile and consult the documentation before running the applications. You need to install Haddock prior to compiling the documentation.

The path to the index.html file which you need to open with a browser is printed out on the terminal if the command succeeds.

Usage

Once you have installed the applications (globally or sandboxed), open an GHC interpreter session (see above for the right command). Each application can be imported as a module under ForSyDe.Shallow.Example. For example, to load and test the RCFilter application here is how the session could look like: