ideas-1.3.1: Feedback services for intelligent tutoring systems

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

Ideas.Common.Environment

Contents

Description

References, bindings, and heterogenous environments

Synopsis

Reference

data Ref a Source

A data type for references (without a value)

Instances

Eq (Ref a) 
Show (Ref a) 
HasId (Ref a) 

class (IsTerm a, Typeable a, Show a, Read a) => Reference a where Source

A type class for types as references

Minimal complete definition

Nothing

Methods

makeRef :: IsId n => n -> Ref a Source

makeRefList :: IsId n => n -> Ref [a] Source

Binding

Heterogeneous environment

class HasEnvironment env where Source

Minimal complete definition

environment, setEnvironment

Methods

environment :: env -> Environment Source

setEnvironment :: Environment -> env -> env Source

deleteRef :: Ref a -> env -> env Source

insertRef :: Typeable a => Ref a -> a -> env -> env Source

changeRef :: Typeable a => Ref a -> (a -> a) -> env -> env Source

class HasRefs a where Source

Minimal complete definition

allRefs

Methods

getRefs :: a -> [Some Ref] Source

allRefs :: a -> [Some Ref] Source

getRefIds :: a -> [Id] Source

(?) :: (HasEnvironment env, Typeable a) => Ref a -> env -> Maybe a Source