ideas-1.5: Feedback services for intelligent tutoring systems

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

Ideas.Common.Rule.Transformation

Contents

Description

This module defines transformations. Given a term, a transformation returns a list of results (often a singleton list or the empty list).

Synopsis

Trans data type

Constructor functions

class MakeTrans f where Source

A type class for constructing a transformation. If possible, makeTrans should be used. Use specialized constructor functions for disambiguation.

Methods

makeTrans :: (a -> f b) -> Trans a b Source

transPure :: (a -> b) -> Trans a b Source

transMaybe :: (a -> Maybe b) -> Trans a b Source

transList :: (a -> [b]) -> Trans a b Source

transEnvMonad :: (a -> EnvMonad b) -> Trans a b Source

transRef :: Typeable a => Ref a -> Trans a a Source

Lifting transformations

makeTransLiftContext :: MakeTrans f => (a -> f a) -> Transformation (Context a) Source

Overloaded variant of transLiftContext

makeTransLiftContext_ :: MakeTrans f => (a -> f ()) -> Transformation (Context a) Source

Overloaded variant of transLiftContext; ignores result

Using transformations

transApply :: Trans a b -> a -> [(b, Environment)] Source