on master help sign in
remove error-based debugging statements
commit1ec11195cb3563f6db0354095ae2ef5694775d3c authorAgentM <agentm@themactionfaction.com> dateSat 23 Sep 2017, 00:06 (9 years ago) parentd7f370e
1 file changed+5−5
src/lib/ProjectM36/RelationalExpression.hs+5−5
src/lib/ProjectM36/RelationalExpression.hs+5−5
@@ -399,7 +399,7 @@ evalDatabaseContextExpr (AddTypeConstructor tConsDef dConsDefList) = do
399399 errs@(_:_) -> pure $ Just (someErrors errs)
400400 [] | T.null tConsName || not (isUpper (T.head tConsName)) -> pure $ Just (InvalidAtomTypeName tConsName)
401401 | isJust (findTypeConstructor tConsName oldTypes) -> pure $ Just (AtomTypeNameInUseError tConsName)
402− | otherwise -> do
402+ | otherwise -> do
403403 let newTypes = oldTypes ++ [(tConsDef, dConsDefList)]
404404 putStateContext $ currentContext { typeConstructorMapping = newTypes }
405405 pure Nothing
@@ -766,11 +766,11 @@ typeFromAtomExpr attrs (AttributeAtomExpr attrName) = do
766766 Right aType -> pure (Right aType)
767767 Left err@(NoSuchAttributeNamesError _) -> case rstate of
768768 RelationalExprStateAttrsElems _ attrs' -> case A.attributeForName attrName attrs' of
769− Left err' -> pure (error "SPAMMO2" $ Left err')
769+ Left err' -> pure (Left err')
770770 Right attr -> pure (Right (A.atomType attr))
771− RelationalExprStateElems _ -> pure (error (show attrs) $ Left err)
771+ RelationalExprStateElems _ -> pure (Left err)
772772 RelationalExprStateTupleElems _ tup -> case atomForAttributeName attrName tup of
773− Left err' -> pure (error "STAMP" $ Left err')
773+ Left err' -> pure (Left err')
774774 Right atom -> pure (Right (atomTypeForAtom atom))
775775 Left err -> pure (Left err)
776776typeFromAtomExpr _ (NakedAtomExpr atom) = pure (Right (atomTypeForAtom atom))
@@ -813,7 +813,7 @@ verifyAtomExprTypes relIn (AttributeAtomExpr attrName) expectedType = runExceptT
813813 RelationalExprStateTupleElems _ _ -> throwE err
814814 RelationalExprStateElems _ -> throwE err
815815 RelationalExprStateAttrsElems _ attrs -> case A.attributeForName attrName attrs of
816− Left err' -> throwE (error "GONK" err')
816+ Left err' -> throwE err'
817817 Right attrType -> either throwE pure (atomTypeVerify expectedType (A.atomType attrType))
818818 Left err -> throwE err
819819verifyAtomExprTypes _ (NakedAtomExpr atom) expectedType = pure (atomTypeVerify expectedType (atomTypeForAtom atom))