haslab / HAAP

Haskell Automated Assessment Platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation

Manual

To install HAAP in a new sandbox, simply run:

cabal sandbox init
cabal sandbox add-source packages/*
cabal install HAAP.cabal

For JavaScript animations you need to have ghcjs installed:

  1. install ghcjs from https://github.com/commercialhaskell/stack/blob/master/doc/ghcjs.md
  2. add ghcjs to your path
  3. install the HAAP ghcjs packages
cabal install --ghcjs packages/codeworld-haap-api packages/ghcjs-extras packages/Xterm

Docker

To try HAAP in a new Docker container, simply run:

docker run -i -t hugopacheco/haap:latest /bin/bash

Since this container has no X window system, it is often useful to bind a directory in your host system, say ~/Desktop, to a path inside your container, say /Desktop, by running the container with the additional argument:

docker run -v ~/Desktop:/Desktop -i -t hugopacheco/haap:latest /bin/bash

Examples

You can then try our examples.

helloworld

A simple hello world example with a simple Hspec specification and Hakyll webpage generation:

cd examples/helloworld
cp ../../cabal.sandbox.config .
cabal exec -- ghc helloworld.hs
./helloworld

The resulting page is generated at _site/index.html.

Check the pre-generated result of this helloworld example.

minimalistic

A minimal example that showcases code analysis tools and CodeWorld integration:

cd examples/minimalistic
cp ../../cabal.sandbox.config .
cabal exec -- ghc minimalistic.hs
./minimalistic
./minimalistic

The resulting page is generated at _site/index.html.

Check the pre-generated result of this minimalistic example.

xterm

An example that showcases xterm.js integration:

cd examples/xterm
cp ../../cabal.sandbox.config .
cabal exec -- ghc xterm.hs
./xterm

The resulting page is generated at _site/index.html.

Check the pre-generated result of this xterm example.

gameworker

An example that showcases a CodeWorld game using JavaScript Web Workers:

cd examples/gameworker
cp ../../cabal.sandbox.config .
cabal exec -- ghc gameworker.hs
./gameworker

The resulting page is generated at _site/index.html. Note that, by default, some browsers (such as Google Chrome) may block local JavaScript Web Workers for security reasons.

Check the pre-generated result of this gameworker example.

plab

A mockup of the Laboratórios de Informática I class feedback page.

cd examples/plab
cp ../../cabal.sandbox.config .
cabal exec -- ghc plab.hs -ioracle
./plab
./plab

The resulting page is generated at _site/index.html.

Check the pre-generated result of this plab example.

About

Haskell Automated Assessment Platform

License:MIT License


Languages

Language:Haskell 48.0%Language:JavaScript 42.8%Language:CSS 5.5%Language:HTML 2.7%Language:Dockerfile 0.5%Language:PHP 0.4%Language:Shell 0.0%