ideas-1.5: Feedback services for intelligent tutoring systems

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

Ideas.Common.Classes

Contents

Description

Type classes and instances.

Synopsis

Type class Apply

class Apply t where Source

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

Methods

applyAll Source

Arguments

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

Returns zero or more results

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

Returns zero or one results

applicable :: Apply t => t a -> a -> Bool Source

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

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

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

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

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

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

Type class Container

class Container f where Source

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

Methods

singleton :: a -> f a Source

getSingleton :: f a -> Maybe a Source

Type class BiArrow

class Arrow arr => BiArrow arr where Source

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

Minimal complete definition

(<->)

Methods

(<->) :: (a -> b) -> (b -> a) -> arr a b infix 1 Source

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

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

Type class BiFunctor

class BiFunctor f where Source

Minimal complete definition

biMap

Methods

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

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

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

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

Type class Fix

class Fix a where Source

Minimal complete definition

Nothing

Methods

fix :: (a -> a) -> a Source

Instances

Buggy and Minor properties

class Buggy a where Source

Minimal complete definition

setBuggy, isBuggy

Methods

buggy :: a -> a Source

setBuggy :: Bool -> a -> a Source

isBuggy :: a -> Bool Source

Instances

class Minor a where Source

Minimal complete definition

setMinor, isMinor

Methods

minor :: a -> a Source

setMinor :: Bool -> a -> a Source

isMinor :: a -> Bool Source

isMajor :: a -> Bool Source

Instances