Improve an error message

This commit is contained in:
John Wiegley 2018-08-07 14:06:50 -04:00
parent 3c979091b8
commit 266793a287
No known key found for this signature in database
GPG key ID: C144D8F4F19FE630

View file

@ -166,10 +166,11 @@ instance MonadNix e m => MonadEval (NValue m) m where
"Inheriting unknown attribute: "
++ intercalate "." (map Text.unpack (NE.toList ks))
attrMissing ks (Just s) =
attrMissing ks (Just s) = do
s' <- prettyNValue s
evalError @(NValue m) $ ErrorCall $ "Could not look up attribute "
++ intercalate "." (map Text.unpack (NE.toList ks))
++ " in " ++ show s
++ " in " ++ show s'
evalCurPos = do
scope <- currentScopes