Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
References, bindings, and heterogenous environments
- data Ref a
- class (IsTerm a, Typeable a, Show a, Read a) => Reference a where
- data Binding
- makeBinding :: Typeable a => Ref a -> a -> Binding
- fromBinding :: Typeable a => Binding -> Maybe (Ref a, a)
- showValue :: Binding -> String
- getTermValue :: Binding -> Term
- data Environment
- makeEnvironment :: [Binding] -> Environment
- singleBinding :: Typeable a => Ref a -> a -> Environment
- class HasEnvironment env where
- environment :: env -> Environment
- setEnvironment :: Environment -> env -> env
- deleteRef :: Ref a -> env -> env
- insertRef :: Typeable a => Ref a -> a -> env -> env
- changeRef :: Typeable a => Ref a -> (a -> a) -> env -> env
- class HasRefs a where
- bindings :: HasEnvironment env => env -> [Binding]
- noBindings :: HasEnvironment env => env -> Bool
- (?) :: (HasEnvironment env, Typeable a) => Ref a -> env -> Maybe a
Reference
A data type for references (without a value)
class (IsTerm a, Typeable a, Show a, Read a) => Reference a where Source
A type class for types as references
Nothing
Binding
makeBinding :: Typeable a => Ref a -> a -> Binding Source
getTermValue :: Binding -> Term Source
Heterogeneous environment
data Environment Source
makeEnvironment :: [Binding] -> Environment Source
singleBinding :: Typeable a => Ref a -> a -> Environment Source
class HasEnvironment env where Source
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
bindings :: HasEnvironment env => env -> [Binding] Source
noBindings :: HasEnvironment env => env -> Bool Source