-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Is a given string a domain suffix?
--   
--   Is a given string a domain suffix?
@package publicsuffixlist
@version 0.1

module Network.PublicSuffixList.DataStructure

-- | The opaque data structure that <tt>isSuffix</tt> can query. This data
--   structure was generated at 2013-04-11 07:27:06.592735 UTC
dataStructure :: DataStructure

module Network.PublicSuffixList.Lookup

-- | <pre>
--   &gt;&gt;&gt; effectiveTLDPlusOne = effectiveTLDPlusOne' Network.PublicSuffixList.DataStructure.dataStructure
--   </pre>
effectiveTLDPlusOne :: Text -> Maybe Text

-- | This function returns whether or not this domain is owned by a
--   registrar or a regular person. <a>Nothing</a> means that this is a
--   registrar domain; 'Just x' means it's owned by a person. This is used
--   to determine if a cookie is allowed to bet set for a particular
--   domain. For example, you shouldn't be able to set a cookie for "com".
--   
--   If the value is 'Just x', then the x value is what is known as the
--   effective TLD plus one. This is one segment more than the suffix of
--   the domain. For example, the eTLD+1 for "this.is.a.subdom.com" is Just
--   "subdom.com"
--   
--   Note that this function expects lowercase ASCII strings. These strings
--   should be gotten from the toASCII algorithm as described in RFC 3490.
--   These strings should not start or end with the '.' character, and
--   should not have two '.' characters next to each other. (The toASCII
--   algorithm is implemented in the 'idna' hackage package, though that
--   package doesn't always map strings to lowercase)
effectiveTLDPlusOne' :: DataStructure -> Text -> Maybe Text

-- | <pre>
--   &gt;&gt;&gt; isSuffix = isSuffix' Network.PublicSuffixList.DataStructure.dataStructure
--   </pre>
isSuffix :: Text -> Bool

-- | <pre>
--   &gt;&gt;&gt; isSuffix' dataStructure = isNothing . effectiveTLDPlusOne' dataStructure
--   </pre>
isSuffix' :: DataStructure -> Text -> Bool
instance GHC.Classes.Eq Network.PublicSuffixList.Lookup.LookupResult
