Added a bit of extra help when a name is not found (suggesting other names)
This commit is contained in:
parent
f69030df34
commit
9e3e71c70a
|
@ -396,6 +396,7 @@ findName thisN thisNT
|
||||||
(origN, origNT) <-
|
(origN, origNT) <-
|
||||||
case lookup (A.nameName thisN) (csLocalNames st) of
|
case lookup (A.nameName thisN) (csLocalNames st) of
|
||||||
Nothing -> dieP (A.nameMeta thisN) $ "name " ++ A.nameName thisN ++ " not defined"
|
Nothing -> dieP (A.nameMeta thisN) $ "name " ++ A.nameName thisN ++ " not defined"
|
||||||
|
++ "; possibilities were: " ++ show (map fst (csLocalNames st))
|
||||||
Just def -> return def
|
Just def -> return def
|
||||||
if thisNT /= origNT
|
if thisNT /= origNT
|
||||||
then dieP (A.nameMeta thisN) $ "expected " ++ show thisNT ++ " (" ++ A.nameName origN ++ " is " ++ show origNT ++ ")"
|
then dieP (A.nameMeta thisN) $ "expected " ++ show thisNT ++ " (" ++ A.nameName origN ++ " is " ++ show origNT ++ ")"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user