ideas-1.7: Feedback services for intelligent tutoring systems

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

Ideas.Common.Strategy.Sequence

Contents

Description

A type class for sequences together with the Firsts type class for accessing the firsts set and ready predicate.

Synopsis

Sequence type class

class Sequence a where Source #

Minimal complete definition

done, (~>), (.*.)

Associated Types

type Sym a Source #

Methods

done :: a Source #

The empty sequence.

(~>) :: Sym a -> a -> a infixr 5 Source #

Prepend a symbol to a sequence.

(.*.) :: a -> a -> a infixr 5 Source #

Append two sequences.

single :: Sym a -> a Source #

Singleton sequence.

sequence :: [a] -> a Source #

Sequential composition.

Instances

Sequence (Process a) Source # 

Associated Types

type Sym (Process a) :: * Source #

Sequence (Strategy a) Source # 

Associated Types

type Sym (Strategy a) :: * Source #

Sequence b => Sequence (a -> b) Source # 

Associated Types

type Sym (a -> b) :: * Source #

Methods

done :: a -> b Source #

(~>) :: Sym (a -> b) -> (a -> b) -> a -> b Source #

(.*.) :: (a -> b) -> (a -> b) -> a -> b Source #

single :: Sym (a -> b) -> a -> b Source #

sequence :: [a -> b] -> a -> b Source #

Firsts type class

class Firsts s where Source #

Minimal complete definition

ready, firsts

Associated Types

type Elem s Source #

The type associated with a step in the first set.

Methods

ready :: s -> Bool Source #

The ready predicate (we are done).

firsts :: s -> [(Elem s, s)] Source #

The firsts set.

Instances

Firsts (Process a) Source # 

Associated Types

type Elem (Process a) :: * Source #

Methods

ready :: Process a -> Bool Source #

firsts :: Process a -> [(Elem (Process a), Process a)] Source #

Firsts (Prefix a) Source # 

Associated Types

type Elem (Prefix a) :: * Source #

Methods

ready :: Prefix a -> Bool Source #

firsts :: Prefix a -> [(Elem (Prefix a), Prefix a)] Source #

Firsts (State a) Source # 

Associated Types

type Elem (State a) :: * Source #

Methods

ready :: State a -> Bool Source #

firsts :: State a -> [(Elem (State a), State a)] Source #