ideas-1.1: Feedback services for intelligent tutoring systems

Portabilityportable (depends on ghc)
Safe HaskellNone




A context for a term that maintains an environment of key-value pairs. A context is both showable and parsable.


Abstract data type

data Context a Source

Abstract data type for a context: a context stores an envrionent (key-value pairs) and a value


newContext :: Environment -> 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