filterSigNames p (TypeSig ns ty nwcs) =
  case filter (p . unLoc) ns of
    []       -> Nothing
    filtered -> Just (TypeSig filtered ty nwcs)
filterSigNames p (TypeSig ns ty nwcs) =
  case filter (p . unLoc) ns of
    []       -> Nothing
    filtered -> Just (TypeSig filtered ty nwcs)
filterSigNames p (TypeSig ns ty nwcs) =
  case filter (p . unLoc) ns of
    []       -> Nothing
    filtered -> Just (TypeSig filtered ty nwcs)