Copyright | (C) 2015 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Richard Eisenberg (eir@cis.upenn.edu) |
Stability | experimental |
Safe Haskell | None |
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.