ideas-1.2: Feedback services for intelligent tutoring systems

Portabilityportable (depends on ghc)
Safe HaskellNone




The Context datatype places a value in a context consisting of an environment with bindings and a point of focus. The datatype is an instance of the HasEnvironment type class (for accessing the environment) and the Navigator type class (for traversing the term).


Abstract data type

data Context a Source

Abstract data type for a context: a context stores an envrionent.


newContext :: ContextNavigator a -> Context aSource

Construct a context

fromContextWith :: Monad m => (a -> b) -> Context a -> m bSource

fromContextWith2 :: Monad m => (a -> b -> c) -> Context a -> Context b -> m cSource

Context navigator


liftToContext :: LiftView f => f a -> f (Context a)Source

Lift a rule to operate on a term in a context

use :: (LiftView f, IsTerm a, IsTerm b) => f a -> f (Context b)Source

useC :: (LiftView f, IsTerm a, IsTerm b) => f (Context a) -> f (Context b)Source

applyTop :: (a -> a) -> Context a -> Context aSource

Apply a function at top-level. Afterwards, try to return the focus to the old position

changeInContext :: (a -> a) -> Context a -> Context aSource