ideas-1.6: 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

HasTypeable Ref Source # 

Methods

getTypeable :: Ref a -> Maybe (IsTypeable a) Source #

Eq (Ref a) Source # 

Methods

(==) :: Ref a -> Ref a -> Bool #

(/=) :: Ref a -> Ref a -> Bool #

Show (Ref a) Source # 

Methods

showsPrec :: Int -> Ref a -> ShowS #

show :: Ref a -> String #

showList :: [Ref a] -> ShowS #

HasId (Ref a) Source # 

Methods

getId :: Ref a -> Id Source #

changeId :: (Id -> Id) -> Ref a -> Ref a Source #

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

A type class for types as references

Methods

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

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

Instances

Reference Char Source # 

Methods

makeRef :: IsId n => n -> Ref Char Source #

makeRefList :: IsId n => n -> Ref [Char] Source #

Reference Int Source # 

Methods

makeRef :: IsId n => n -> Ref Int Source #

makeRefList :: IsId n => n -> Ref [Int] Source #

Reference ShowString Source # 

Methods

makeRef :: IsId n => n -> Ref ShowString Source #

makeRefList :: IsId n => n -> Ref [ShowString] Source #

Reference Term Source # 

Methods

makeRef :: IsId n => n -> Ref Term Source #

makeRefList :: IsId n => n -> Ref [Term] Source #

Reference a => Reference [a] Source # 

Methods

makeRef :: IsId n => n -> Ref [a] Source #

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

(Reference a, Reference b) => Reference (a, b) Source # 

Methods

makeRef :: IsId n => n -> Ref (a, b) Source #

makeRefList :: IsId n => n -> Ref [(a, b)] Source #

mapRef :: Typeable b => Isomorphism a b -> Ref a -> Ref b Source #

Binding

Heterogeneous environment

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 => Ref a -> env -> Maybe a Source #