ideas-1.1: Feedback services for intelligent tutoring systems

Portabilityportable (depends on ghc)
Stabilityprovisional
Maintainerbastiaan.heeren@ou.nl
Safe HaskellNone

Ideas.Common.Exercise

Contents

Description

This module defines the concept of an exercise

Synopsis

Exercises

difference :: Exercise a -> a -> a -> Maybe (a, a)Source

differenceEqual :: Exercise a -> a -> a -> Maybe (a, a)Source

getRule :: Monad m => Exercise a -> Id -> m (Rule (Context a))Source

inContext :: Exercise a -> a -> Context aSource

Put a value into an empty environment

type Examples a = [(Difficulty, a)]Source

mapExamples :: (a -> b) -> Examples a -> Examples bSource

hasTypeable :: Exercise a -> Maybe (IsTypeable a)Source

useTypeable :: Typeable a => Maybe (IsTypeable a)Source

castTo :: Typeable b => Exercise a -> b -> Maybe aSource

Exercise status

data Status Source

Constructors

Stable

A released exercise that has undergone some thorough testing

Provisional

A released exercise, possibly with some deficiencies

Alpha

An exercise that is under development

Experimental

An exercise for experimentation purposes only

Instances

isPublic :: Exercise a -> BoolSource

An exercise with the status Stable or Provisional

isPrivate :: Exercise a -> BoolSource

An exercise that is not public

Miscellaneous

withoutContext :: (a -> a -> Bool) -> Context a -> Context a -> BoolSource

Function for defining equivalence or similarity without taking the context into account.

simpleSimilarity :: Exercise a -> a -> a -> BoolSource

Similarity on terms without a context

simpleEquivalence :: Exercise a -> a -> a -> BoolSource

Equivalence on terms without a context

restrictGenerator :: (a -> Bool) -> Gen a -> Gen aSource

showDerivation :: Exercise a -> a -> StringSource

Shows a derivation for a given start term. The specified rule ordering is used for selection.

checkParserPretty :: (a -> a -> Bool) -> (String -> Either String a) -> (a -> String) -> a -> BoolSource