Safe HaskellNone

Main

Description

This module presents a minimalistic example of the usage of HAAP, consisting on testing an HSpec specification, running several code analysis plugins, providing global feedback with the ranking and tournament plugins, visualization of solutions with CodeWorld, all connected by a webpage generated by Hakyll.

Synopsis

Documentation

example :: Project #

data Example_DB #

Constructors

Example_DB 

Fields

Instances

Generic Example_DB # 

Associated Types

type Rep Example_DB :: * -> *

Methods

from :: Example_DB -> Rep Example_DB x

to :: Rep Example_DB x -> Example_DB

Binary Example_DB # 

Methods

put :: Example_DB -> Put

get :: Get Example_DB

putList :: [Example_DB] -> Put

type Rep Example_DB # 
type Rep Example_DB = D1 (MetaData "Example_DB" "Main" "main" False) (C1 (MetaCons "Example_DB" PrefixI True) (S1 (MetaSel (Just Symbol "exTourneyDB") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HaapTourneyDB ExPlayer))))

lnsTourney :: DBLens (BinaryDB Example_DB) (HaapTourneyDB ExPlayer) #

main :: IO ((), HaapLog) #

An HAAP script that runs tests with the HSpec plugin, runs several code analysis plugins, generates feedback with the ranking and tournament plugins, provides visualization with the CodeWorld plugin and uses the Hakyll plugin to generate a webpage that connects all artifacts.

exSpec :: HaapSpec #

A concrete specification to be tested.

exRankSpec :: Int -> HaapSpec #

A specification to be used in a ranking, will be run for each group.

exRankScore :: HaapTestRes -> FloatScore #

Calculates a quantitative score from the results of the tests.

exRank :: HaapStack t m => HaapSpecRank t m Int FloatScore #

Builds a global ranking according to the result of exRankSpec for each group, normalized according to exRankScore.

data ExPlayer #

Constructors

ExPlayer (String, Bool) 

Instances

Eq ExPlayer # 

Methods

(==) :: ExPlayer -> ExPlayer -> Bool

(/=) :: ExPlayer -> ExPlayer -> Bool

Ord ExPlayer # 

Methods

compare :: ExPlayer -> ExPlayer -> Ordering

(<) :: ExPlayer -> ExPlayer -> Bool

(<=) :: ExPlayer -> ExPlayer -> Bool

(>) :: ExPlayer -> ExPlayer -> Bool

(>=) :: ExPlayer -> ExPlayer -> Bool

max :: ExPlayer -> ExPlayer -> ExPlayer

min :: ExPlayer -> ExPlayer -> ExPlayer

Show ExPlayer # 

Methods

showsPrec :: Int -> ExPlayer -> ShowS

show :: ExPlayer -> String

showList :: [ExPlayer] -> ShowS

Generic ExPlayer # 

Associated Types

type Rep ExPlayer :: * -> *

Methods

from :: ExPlayer -> Rep ExPlayer x

to :: Rep ExPlayer x -> ExPlayer

TourneyPlayer ExPlayer # 
Out ExPlayer # 

Methods

docPrec :: Int -> ExPlayer -> Doc

doc :: ExPlayer -> Doc

docList :: [ExPlayer] -> Doc

Binary ExPlayer # 

Methods

put :: ExPlayer -> Put

get :: Get ExPlayer

putList :: [ExPlayer] -> Put

NFData ExPlayer # 

Methods

rnf :: ExPlayer -> ()

type Rep ExPlayer # 
type Rep ExPlayer = D1 (MetaData "ExPlayer" "Main" "main" False) (C1 (MetaCons "ExPlayer" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (String, Bool))))

exTourney :: MonadIO m => HaapTourney t m (BinaryDB Example_DB) ExPlayer Link #

codeworldDrawArgs :: CodeWorldArgs #

Arguments for the CodeWorld plugin to draw maps.

codeworldGameArgs :: CodeWorldArgs #

Arguments for the CodeWorld plugin to play a game.