mirror of
https://github.com/github/semantic.git
synced 2025-01-01 19:55:34 +03:00
implement Lower for EvalContext
This commit is contained in:
parent
ec163d5910
commit
2fbbd239e3
@ -58,6 +58,9 @@ newtype Environment address = Environment { unEnvironment :: NonEmpty (Bindings
|
||||
data EvalContext address = EvalContext { ctxSelf :: Maybe address, ctxEnvironment :: Environment address }
|
||||
deriving (Eq, Ord, Show)
|
||||
|
||||
instance Lower (EvalContext address) where
|
||||
lowerBound = EvalContext Nothing lowerBound
|
||||
|
||||
-- | Make and enter a new empty scope in the given environment.
|
||||
push :: Environment address -> Environment address
|
||||
push (Environment (a :| as)) = Environment (mempty :| a : as)
|
||||
|
Loading…
Reference in New Issue
Block a user