mirror of
https://github.com/github/semantic.git
synced 2025-01-06 23:46:21 +03:00
📝 variable.
This commit is contained in:
parent
92011e8ef2
commit
f3b3191969
@ -66,6 +66,7 @@ data EvalError value resume where
|
||||
-- Indicates we weren't able to dereference a name from the evaluated environment.
|
||||
FreeVariableError :: Name -> EvalError value value
|
||||
|
||||
-- | Look up and dereference the given 'Name', throwing an exception for free variables.
|
||||
variable :: MonadEvaluatable location term value m => Name -> m value
|
||||
variable name = lookupWith deref name >>= maybeM (throwException (FreeVariableError name))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user