on master help sign in
remove some unused stale crust
commit01c7abe1893bbeae87346ba9f55f4f62e886da1d authorAgentM <agentm@themactionfaction.com> dateSun 23 Aug 2015, 15:52 (11 years ago) parent9e727a1
1 file changed−21
ProjectM36/Relation.hs−21
ProjectM36/Relation.hs−21
@@ -50,27 +50,6 @@ relationTrue = Relation A.emptyAttributes singletonTupleSet
5050relationFalse :: Relation
5151relationFalse = Relation A.emptyAttributes emptyTupleSet
5252
53−madeTrue :: Either RelationalError Relation
54−madeTrue = mkRelation A.emptyAttributes (HS.fromList [])
55−
56−madeFalse :: Either RelationalError Relation
57−madeFalse = mkRelation A.emptyAttributes emptyTupleSet
58−
59−{-
60−--used for predicate filtering- instead of allowing for tuple types to be floating around in Tutorial D, just created a "singleton value" relation with cardinality and arity 1 for tuple atom comparison purposes
61−singletonValueFromRelation :: Relation -> Either RelationalError Atom
62−singletonValueFromRelation rel@(Relation _ tupSet) = if cardinality rel /= Countable 1 then
63− Left (PredicateExpressionError "Relational expression must have cardinality 1")
64− else if arity rel /= 1 then
65− Left (PredicateExpressionError "Relation expression must have arity 1")
66− else
67− Right value
68− where
69− value = snd $ head $ M.toList tupMap
70− tupMap = tup2Map $ head (HS.toList tupSet)
71− tup2Map (RelationTuple tupmap) = tupmap
72−-}
73−
7453union :: Relation -> Relation -> Either RelationalError Relation
7554union (Relation attrs1 tupSet1) (Relation attrs2 tupSet2) =
7655 if not (A.attributesEqual attrs1 attrs2)