1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Get the declared names of classes using declaredName.

This commit is contained in:
Rob Rix 2018-07-16 10:22:27 -04:00
parent cc6ed63103
commit 406a2ee625

View File

@ -164,7 +164,7 @@ instance Show1 Class where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable Class where instance Evaluatable Class where
eval Class{..} = do eval Class{..} = do
name <- either (throwEvalError . FreeVariablesError) pure (freeVariable $ subterm classIdentifier) name <- maybeM (throwEvalError (FreeVariablesError [])) (declaredName (subterm classIdentifier))
supers <- traverse subtermAddress classSuperclasses supers <- traverse subtermAddress classSuperclasses
(_, addr) <- letrec name $ do (_, addr) <- letrec name $ do
void $ subtermValue classBody void $ subtermValue classBody