1
1
mirror of https://github.com/github/semantic.git synced 2025-01-08 16:39:47 +03:00

If evaluatable instance returns a ValueRef

This commit is contained in:
joshvera 2018-11-05 16:11:04 -05:00
parent 63aa9da7f6
commit f2754368cb

View File

@ -51,7 +51,7 @@ instance Show1 If where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable If where
eval eval (If cond if' else') = do
bool <- eval cond >>= Abstract.value
Rval <$> ifthenelse bool (eval if' >>= address) (eval else' >>= address)
ifthenelse bool (eval if') (eval else')
instance Tokenize If where
tokenize If{..} = within' Scope.If $ do