@@ -518,8 +518,9 @@ evalDatabaseContextExpr (ExecuteDatabaseContextFunction funcName atomArgExprs) _
518518 let mValidTypes = map (\(expType, actType) -> case atomTypeVerify expType actType of
519519 Left err -> Just err
520520 Right _ -> Nothing) (zip (dbcFuncType func) atomTypes)
521− typeErrors = catMaybes mValidTypes
522− eAtomArgs = map (\arg -> runReader (evalAtomExpr emptyTuple arg) relExprState) atomArgExprs
521+ typeErrors = catMaybes mValidTypes
522+ eAtomArgs = unimplemented
523+ --eAtomArgs = map (\arg -> runReader (evalAtomExpr emptyTuple arg) relExprState) atomArgExprs
523524 if length (lefts eAtomArgs) > 1 then
524525 pure (Left (someErrors (lefts eAtomArgs)))
525526 else if not (null typeErrors) then
@@ -644,7 +645,8 @@ updateTupleWithAtomExprs :: M.Map AttributeName AtomExpr -> DatabaseContext -> T
644645updateTupleWithAtomExprs exprMap context graph tupIn = do
645646 --resolve all atom exprs
646647 atomsAssoc <- mapM (\(attrName, atomExpr) -> do
647− atom <- runReader (evalAtomExpr tupIn atomExpr) (mkRelationalExprState context graph)
648+ let atom = unimplemented
649+ --atom <- runReader (evalAtomExpr tupIn atomExpr) (mkRelationalExprState context graph)
648650 pure (attrName, atom)
649651 ) (M.toList exprMap)
650652 pure (updateTupleWithAtoms (M.fromList atomsAssoc) tupIn)
@@ -734,6 +736,7 @@ predicateRestrictionFilter attrs (NotPredicate expr) =
734736 pure (fmap not . exprv)
735737
736738--optimization opportunity: if the subexpression does not reference attributes in the top-level expression, then it need only be evaluated once, statically, outside the tuple filter- see historical implementation here
739+{-
737740predicateRestrictionFilter _ (RelationalExprPredicate relExpr) = do
738741 rstate <- ask
739742 pure (Right (\tup -> case runReader (evalRelationalExpr relExpr) (mergeTuplesIntoRelationalExprState tup rstate) of
@@ -783,7 +786,7 @@ predicateRestrictionFilter attrs (AtomExprPredicate atomExpr) = do
783786 case runReader (evalAtomExpr tupleIn atomExpr) rstate of
784787 Left err -> Left err
785788 Right boolAtomValue -> pure (boolAtomValue == BoolAtom True))
786−
789+-}
787790tupleExprCheckNewAttrName :: AttributeName -> Relation -> Either RelationalError Relation
788791tupleExprCheckNewAttrName attrName rel = if isRight (attributeForName attrName rel) then
789792 Left (AttributeNameInUseError attrName)
@@ -801,11 +804,12 @@ extendTupleExpressionProcessor relIn (AttributeExtendTupleExpr newAttrName atomE
801804 atomExprType' <- liftE (verifyAtomExprTypes relIn atomExpr atomExprType)
802805 let newAttrs = A.attributesFromList [Attribute newAttrName atomExprType']
803806 newAndOldAttrs = A.addAttributes (attributes relIn) newAttrs
804− pure (newAndOldAttrs, \tup -> let substate = mergeTuplesIntoRelationalExprState tup rstate in case runReader (evalAtomExpr tup atomExpr) substate of
807+ pure (newAndOldAttrs, \tup -> let substate = mergeTuplesIntoRelationalExprState tup rstate in
808+ case unimplemented {-runReader (evalAtomExpr tup atomExpr) substate-} of
805809 Left err -> Left err
806810 Right atom -> Right (tupleAtomExtend newAttrName atom tup)
807811 )
808−
812+{-
809813evalAtomExpr :: RelationTuple -> AtomExpr -> RelationalExprState (Either RelationalError Atom)
810814evalAtomExpr tupIn (AttributeAtomExpr attrName) = case atomForAttributeName attrName tupIn of
811815 Right atom -> pure (Right atom)
@@ -852,7 +856,7 @@ evalAtomExpr tupIn cons@(ConstructedAtomExpr dConsName dConsArgs ()) = runExcept
852856 aType <- either throwE pure (runReader (typeFromAtomExpr (tupleAttributes tupIn) cons) newState)
853857 argAtoms <- mapM (\arg -> either throwE pure (runReader (evalAtomExpr tupIn arg) newState)) dConsArgs
854858 pure (ConstructedAtom dConsName aType argAtoms)
855−
859+-}
856860typeFromAtomExpr :: Attributes -> AtomExpr -> RelationalExprState (Either RelationalError AtomType)
857861typeFromAtomExpr attrs (AttributeAtomExpr attrName) = do
858862 rstate <- ask
@@ -863,7 +867,7 @@ typeFromAtomExpr attrs (AttributeAtomExpr attrName) = do
863867 stateAttrs = stateAttributes rstate in
864868 case A.attributeForName attrName stateAttrs of
865869 Right attr -> pure (Right (A.atomType attr))
866− Left _ -> case atomForAttributeName attrName tup of
870+ Left _ -> case atomForAttributeName attrName stateTup of
867871 Right atom -> pure (Right (atomTypeForAtom atom))
868872 Left _ -> pure (Left err)
869873
@@ -887,7 +891,7 @@ typeFromAtomExpr attrs (FunctionAtomExpr funcName atomArgs _) = do
887891 Right tvMap -> pure (resolveFunctionReturnValue funcName tvMap funcRetType)
888892typeFromAtomExpr attrs (RelationAtomExpr relExpr) = runExceptT $ do
889893 rstate <- lift ask
890− relType <- either throwE pure (runReader (typeForRelationalExpr relExpr) (mergeAttributesIntoRelationalExprState attrs rstate))
894+ relType <- either throwE pure (runReader (typeForRelationalExpr relExpr () (mergeAttributesIntoRelationalExprState attrs rstate))
891895 pure (RelationAtomType (attributes relType))
892896-- grab the type of the data constructor, then validate that the args match the expected types
893897typeFromAtomExpr attrs (ConstructedAtomExpr dConsName dConsArgs _) =