1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 10:27:45 +03:00

Use withExports in Program

This commit is contained in:
joshvera 2018-03-08 15:56:29 -05:00
parent 2e9e15bdbb
commit a6481b2adc

View File

@ -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