testPattern :: P.Parser a -> Text -> Bool
testPattern p t = test result
  where result = P.parse p t
        test r = case r of
                    P.Fail{}      -> False
                    P.Partial f   -> test $ f ""
                    (P.Done i _)  -> T.null i

-- Some patterns that are sort of generic
-- This holds for all: they are not exactly right... but good enough for now

-- | Characters in the label parts of hostnames
testPattern :: P.Parser a -> Text -> Bool
testPattern p t = test result
  where result = P.parse p t
        test r = case r of
                    P.Fail{}      -> False
                    P.Partial f   -> test $ f ""
                    (P.Done i _)  -> T.null i

-- Some patterns that are sort of generic
-- This holds for all: they are not exactly right... but good enough for now

-- | Characters in the label parts of hostnames
testPattern p t = test result
  where result = P.parse p t
        test r = case r of
                    P.Fail{}      -> False
                    P.Partial f   -> test $ f ""
                    (P.Done i _)  -> T.null i

-- Some patterns that are sort of generic
-- This holds for all: they are not exactly right... but good enough for now

-- | Characters in the label parts of hostnames