-- | check that two filters have the same structure, ignoring parameters
-- TODO can this be written without so much repetition?
sameStructure :: Filter -> Filter -> Bool
sameStructure f1 f2 = fmap (toConstr. nodeContent) f1 == fmap (toConstr. nodeContent) f2
sameStructure :: Filter -> Filter -> Bool
sameStructure f1 f2 = fmap (toConstr. nodeContent) f1 == fmap (toConstr. nodeContent) f2
sameStructure f1 f2 = fmap (toConstr. nodeContent) f1 == fmap (toConstr. nodeContent) f2