1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 01:11:52 +03:00

Slightly more helpful failure message

This commit is contained in:
Timothy Clem 2018-03-23 09:09:25 -07:00
parent 19592c72c2
commit b5f4c1e94f

View File

@ -179,7 +179,7 @@ instance ( Monad m
scopedEnvironment o
| Just (Class _ env) <- prjValue o = pure env
| Just (Namespace _ env) <- prjValue o = pure env
| otherwise = fail ("non-object type passed to scopedEnvironment: " <> show o)
| otherwise = fail ("object type passed to scopedEnvironment doesn't have an environment: " <> show o)
asString v
| Just (Value.String n) <- prjValue v = pure n