ideas-1.1: Feedback services for intelligent tutoring systems

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

Ideas.Common.Classes

Contents

Description

Type classes and instances.

Synopsis

Type class Apply

class Apply t whereSource

A type class for functors that can be applied to a value. Transformation, Rule, and Strategy are all instances of this type class.

Methods

applyAllSource

Arguments

:: t a 
-> a 
-> [a]

Returns zero or more results

apply :: Apply t => t a -> a -> Maybe aSource

Returns zero or one results

applicable :: Apply t => t a -> a -> BoolSource

Checks whether the functor is applicable (at least one result)

applyD :: Apply t => t a -> a -> aSource

If not applicable, return the current value (as default)

applyM :: (Apply t, Monad m) => t a -> a -> m aSource

Same as apply, except that the result (at most one) is returned in some monad

applyList :: Apply t => [t a] -> a -> Maybe aSource

Type class Container

class Container f whereSource

Instances should satisfy the following law: getSingleton . singleton == Just

Methods

singleton :: a -> f aSource

getSingleton :: f a -> Maybe aSource

Instances

Type class BiArrow

class Arrow arr => BiArrow arr whereSource

Type class for bi-directional arrows. - should be used instead of arr from the arrow interface. Minimal complete definition: -.

Methods

(<->) :: (a -> b) -> (b -> a) -> arr a bSource

(!->) :: (a -> b) -> arr a bSource

(<-!) :: (b -> a) -> arr a bSource

Type class BiFunctor

class BiFunctor f whereSource

Methods

biMap :: (a -> c) -> (b -> d) -> f a b -> f c dSource

mapFirst :: (a -> b) -> f a c -> f b cSource

mapSecond :: (b -> c) -> f a b -> f a cSource

mapBoth :: BiFunctor f => (a -> b) -> f a a -> f b bSource

Buggy and Minor properties

class Buggy a whereSource

Methods

buggy :: a -> aSource

setBuggy :: Bool -> a -> aSource

isBuggy :: a -> BoolSource

Instances

Buggy (Rule a) 

class Minor a whereSource

Methods

minor :: a -> aSource

setMinor :: Bool -> a -> aSource

isMinor :: a -> BoolSource

isMajor :: a -> BoolSource

Instances

Minor (Rule a) 
Minor (Step l a)