@@ -87,12 +87,12 @@ joinAttributes attrs1 attrs2 | V.length uniqueOverlappingAttributes /= V.length
8787 overlappingAttributes = V.filter (`V.elem` attrs2) attrs1
8888-}
8989joinAttributes :: Attributes -> Attributes -> Either RelationalError Attributes
90−joinAttributes attrs1 attrs2 =
91− if S.size overlappingNames == 0 then -- fast path, no overlapping names
90+joinAttributes attrs1 attrs2
91+ | S.size overlappingNames == 0 = -- fast path, no overlapping names
9292 pure (concated id)
93− else if attributesForNames overlappingNames attrs1 == attributesForNames overlappingNames attrs2 then -- check that atomtypes match
93+ | attributesForNames overlappingNames attrs1 == attributesForNames overlappingNames attrs2 = -- that atomtypes match
9494 pure (concated vectorUniqueify)
95− else
95+ | otherwise =
9696 --special handling to validate that overlapping names have the same atom types
9797 Left (TupleAttributeTypeMismatchError (attributesForNames overlappingNames attrs1))
9898 where
@@ -111,7 +111,7 @@ member :: Attribute -> Attributes -> Bool
111111member attr attrs = HS.member attr (attributesSet attrs)
112112
113113deleteAttributeName :: AttributeName -> Attributes -> Attributes
114−deleteAttributeName attrName attrs = deleteAttributeNames (S.singleton attrName) attrs
114+deleteAttributeName attrName = deleteAttributeNames (S.singleton attrName)
115115
116116deleteAttributeNames :: S.Set AttributeName -> Attributes -> Attributes
117117deleteAttributeNames attrNames attrs = Attributes {
@@ -215,7 +215,7 @@ attributesDifference attrsA attrsB =
215215 hset = HS.difference setA setB <> HS.difference setB setA
216216 setA = attributesSet attrsA
217217 setB = attributesSet attrsB
218− vec = V.filter (\attr -> HS.member attr hset) (attributesVec attrsA <> attributesVec attrsB)
218+ vec = V.filter (`HS.member` hset) (attributesVec attrsA <> attributesVec attrsB)
219219
220220vectorUniqueify :: (Hash.Hashable a, Eq a) => V.Vector a -> V.Vector a
221221vectorUniqueify vecIn = V.fromList $ HS.toList $ HS.fromList $ V.toList vecIn