checkAttrs :: Attributes -> Ext Record -> Bool
checkAttrs qry rec = all (matches $ getAttributes rec) (M.assocs qry)
  where
    matches attrs (name, avalue) =
      case M.lookup name attrs of
        Nothing  -> False
        Just val -> matchAV val avalue

-- | Apply all deduplication rules
checkAttrs :: Attributes -> Ext Record -> Bool
checkAttrs qry rec = all (matches $ getAttributes rec) (M.assocs qry)
  where
    matches attrs (name, avalue) =
      case M.lookup name attrs of
        Nothing  -> False
        Just val -> matchAV val avalue

-- | Apply all deduplication rules
checkAttrs qry rec = all (matches $ getAttributes rec) (M.assocs qry)
  where
    matches attrs (name, avalue) =
      case M.lookup name attrs of
        Nothing  -> False
        Just val -> matchAV val avalue

-- | Apply all deduplication rules