@@ -24,12 +24,10 @@ verifyTupleSet attrs tupleSet = do
2424 if length (lefts tupleList) > 0 then
2525 Left $ head (lefts tupleList)
2626 else
27− return $ RelationTupleSet (rights tupleList)
27+ return $ RelationTupleSet $ (HS.toList . HS.fromList) (rights tupleList)
2828
2929mkTupleSet :: Attributes -> [RelationTuple] -> Either RelationalError RelationTupleSet
30−mkTupleSet attrs tuples = verifyTupleSet attrs tupSet
31− where
32− tupSet = RelationTupleSet $ (HS.toList . HS.fromList) tuples
30+mkTupleSet attrs tuples = verifyTupleSet attrs (RelationTupleSet tuples)
3331
3432mkTupleSetFromList :: Attributes -> [[Atom]] -> Either RelationalError RelationTupleSet
3533mkTupleSetFromList attrs atomMatrix = mkTupleSet attrs $ map (\atomList -> mkRelationTuple attrs (V.fromList atomList)) atomMatrix