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
- mapRef :: Typeable b => Isomorphism a b -> Ref a -> Ref b
- data Binding
- makeBinding :: Ref a -> a -> Binding
- fromBinding :: Typeable a => Binding -> Maybe (Ref a, a)
- showValue :: Binding -> String
- getTermValue :: Binding -> Term
- data Environment
- makeEnvironment :: [Binding] -> Environment
- singleBinding :: Ref a -> a -> Environment
- class HasEnvironment env where
- class HasRefs a where
- bindings :: HasEnvironment env => env -> [Binding]
- noBindings :: HasEnvironment env => env -> Bool
- (?) :: HasEnvironment env => 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
Binding
makeBinding :: Ref a -> a -> Binding Source #
getTermValue :: Binding -> Term Source #
Heterogeneous environment
data Environment Source #
makeEnvironment :: [Binding] -> Environment Source #
singleBinding :: 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 #
bindings :: HasEnvironment env => env -> [Binding] Source #
noBindings :: HasEnvironment env => env -> Bool Source #