publicsuffixlist-0.1: Is a given string a domain suffix?

Safe Haskell | Safe-Inferred
Language | Haskell98

Network.PublicSuffixList.Create

Description

This script parses the public suffix list, and constructs a data structure which can be used with the isSuffix function in Lookup.hs. It exports a GSink which produces the opaque `DataStructure` and can be fed any Source as input.

This makes an few assumption about the information in the public suffix list: namely, that no rule is a suffix of another rule. For example, if there is a rule abc.def.ghi then then is no other rule def.ghi or !def.ghi

The actual data structure involved here is a tree where the nodes have no value and the edges are DNS labels. There are two trees: one to handle the exception rules, and one to handle the regular rules.

# Documentation

data PublicSuffixListException Source #

#### Instances

Instances details

Exception PublicSuffixListException Source # |
Instance details Defined in Network.PublicSuffixList.Create Methods toException :: PublicSuffixListException -> SomeException Source # fromException :: SomeException -> Maybe PublicSuffixListException Source # displayException :: PublicSuffixListException -> String Source #
Show PublicSuffixListException Source # |
Instance details Defined in Network.PublicSuffixList.Create Methods showsPrec :: Int -> PublicSuffixListException -> ShowS Source # show :: PublicSuffixListException -> String Source # showList :: [PublicSuffixListException] -> ShowS Source #

sink :: MonadThrow m => Sink ByteString m DataStructure Source #