Copyright | (C) 2015 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Richard Eisenberg (rae@cs.brynmawr.edu) |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell2010 |
Manages the global variables in Glambda
Documentation
The global variable environment maps variables to type-checked expressions
emptyGlobals :: Globals Source #
An empty global variable environment
extend :: String -> STy ty -> Exp '[] ty -> Globals -> Globals Source #
Extend a Globals
with a new binding
lookupGlobal :: MonadError Doc m => Globals -> String -> (forall ty. STy ty -> Exp '[] ty -> m r) -> m r Source #
Lookup a global variable. Fails with throwError
if the variable
is not bound.