on master help sign in
Better errors from executor
commitb7316b7ebbcc0e704f37dc68b5077d429c5b3d36 authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateTue 19 Aug 2014, 17:39 (12 years ago) parent09e5383
1 file changed+2−1
src/Idris/Core/Execute.hs+2−1
src/Idris/Core/Execute.hs+2−1
@@ -164,7 +164,8 @@ doExec env ctxt p@(P Ref n ty) =
164164 doExec env ctxt tm
165165 [CaseOp _ _ _ _ _ (CaseDefs _ (ns, sc) _ _)] -> return (EP Ref n EErased)
166166 [] -> execFail . Msg $ "Could not find " ++ show n ++ " in definitions."
167− thing -> trace (take 200 $ "got to " ++ show thing ++ " lookup up " ++ show n) $ undefined
167+ other | length other > 1 -> execFail . Msg $ "Multiple definitions found for " ++ show n
168+ | otherwise -> execFail . Msg . take 500 $ "got to " ++ show other ++ " lookup up " ++ show n
168169doExec env ctxt p@(P Bound n ty) =
169170 case lookup n env of
170171 Nothing -> execFail . Msg $ "not found"