mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +03:00
Use withExports in Program
This commit is contained in:
parent
2e9e15bdbb
commit
a6481b2adc
@ -138,10 +138,7 @@ instance Show1 Program where liftShowsPrec = genericLiftShowsPrec
|
|||||||
|
|
||||||
instance Evaluatable Program where
|
instance Evaluatable Program where
|
||||||
eval (Program xs) = do
|
eval (Program xs) = do
|
||||||
set <- getExports
|
withExports mempty (eval' xs)
|
||||||
v <- eval' xs
|
|
||||||
setExports set -- Reset the export state
|
|
||||||
pure v
|
|
||||||
where
|
where
|
||||||
eval' [] = unit >>= interface
|
eval' [] = unit >>= interface
|
||||||
eval' [x] = subtermValue x >>= interface
|
eval' [x] = subtermValue x >>= interface
|
||||||
|
Loading…
Reference in New Issue
Block a user