-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Parsing, formatting, and validating international phone -- numbers -- -- This package provides bindings for the C++ version of the -- libphonenumber library. The bindings currently do not include -- AsYouTypeFormatter and ShortNumberInfo. -- -- The interface largely resembles that of the original unified C++, -- Java, and JavaScript version of the library, with some minor changes -- to make the interface more Haskell-like. -- -- The provided functions are pure, under the assumption that we are the -- only user of the C++ library, i.e. that no one else has installed a -- global logger which could observe side-effects from library calls. -- -- The underlying library internally uses UTF-8 encoded byte strings. To -- avoid decoding overhead where it is unnecessary, and to avoid a -- dependency on text, we use ByteString throughout the -- library instead of Data.Text.Text. @package libphonenumber @version 0.1.0.0 -- | Data fields of PhoneNumber objects. module Data.PhoneNumber.Number -- | A decoded phone number. While internally it is a handle for the -- corresponding C++ object, for most intents and purposes it can be used -- as a record (using the PhoneNumber record pattern synonym) with -- the following structure: -- --
--   PhoneNumber
--   { extension :: !(Maybe ByteString)
--   , rawInput :: !(Maybe ByteString)
--   , preferredDomesticCarrierCode :: !(Maybe ByteString)
--   , nationalNumber :: !Word
--   , countryCode :: ! CountryCode
--   , italianLeadingZero :: !(Maybe Bool)
--   , countryCodeSource :: !(Maybe CountryCodeSource)
--   , numberOfLeadingZeros :: !(Maybe Int)
--   }
--   
data PhoneNumber -- | Record pattern synonym for accessing data fields of the underlying C++ -- object. It can be used for record construction, record update, and -- record pattern match. See PhoneNumber. pattern PhoneNumber :: Maybe ByteString -> Maybe ByteString -> Maybe ByteString -> Word -> CountryCode -> Maybe Bool -> Maybe CountryCodeSource -> Maybe Int -> PhoneNumber -- | E.g.: -- --
--   parseNumber Canonicalize Nothing "+1 800-234-5678 ext. 1234"
--   = Right PhoneNumber { extension = Just "1234", .. }
--   
extension :: PhoneNumber -> Maybe ByteString -- | E.g.: -- --
--   parseNumber KeepRawInput Nothing " + 1(2-3~4*5.6 "
--   = Right PhoneNumber { rawInput = Just " + 1(2-3~4*5.6 ", .. }
--   
rawInput :: PhoneNumber -> Maybe ByteString -- | E.g.: -- --
--   parseNumber KeepRawInput (Just "BR") "0 41 (21) 2345-6789"
--   = Right PhoneNumber { preferredDomesticCarrierCode = Just "41", .. }
--   
preferredDomesticCarrierCode :: PhoneNumber -> Maybe ByteString -- | You probably want to use nationalSignificantNumber instead. -- E.g.: -- --
--   parseNumber Canonicalize Nothing "+800 0001 2345"
--   = Right PhoneNumber { nationalNumber = 12345, numberOfLeadingZeros = Just 3, .. }
--   
nationalNumber :: PhoneNumber -> Word -- | E.g.: -- --
--   parseNumber Canonicalize (Just "US") "800-234-5678"
--   = Right PhoneNumber { countryCode = 1, .. }
--   
countryCode :: PhoneNumber -> CountryCode -- | E.g.: -- --
--   parseNumber Canonicalize Nothing "+39 06 1234 5678"
--   = Right PhoneNumber { italianLeadingZero = Just True, .. }
--   
italianLeadingZero :: PhoneNumber -> Maybe Bool -- | E.g.: -- --
--   parseNumber KeepRawInput (Just "US") "011 800 1234 5678"
--   = Right PhoneNumber { countryCodeSource = Just FromNumberWithIdd, .. }
--   
countryCodeSource :: PhoneNumber -> Maybe CountryCodeSource -- | E.g.: -- --
--   parseNumber Canonicalize Nothing "+800 0001 2345"
--   = Right PhoneNumber { numberOfLeadingZeros = Just 3, nationalNumber = 12345, .. }
--   
numberOfLeadingZeros :: PhoneNumber -> Maybe Int -- | A country calling code (International Subscriber Dialing code, ISD -- code), e.g. 34 for Spain. -- -- Contrary to the name, doesn't always correspond to a unique country -- (e.g. 7 could be either Russia or Kazakhstan), or a country -- at all, and instead a non-geographical entity (e.g. 800 is a -- Universal International Freephone Service dialing code). newtype CountryCode CountryCode :: Int -> CountryCode -- | Indicates what information was used to fill the countryCode -- field of PhoneNumber. data CountryCodeSource Unspecified :: CountryCodeSource FromNumberWithPlusSign :: CountryCodeSource FromNumberWithIdd :: CountryCodeSource FromNumberWithoutPlusSign :: CountryCodeSource FromDefaultCountry :: CountryCodeSource instance GHC.Num.Num Data.PhoneNumber.Number.CountryCode instance GHC.Show.Show Data.PhoneNumber.Number.CountryCode instance GHC.Classes.Ord Data.PhoneNumber.Number.CountryCode instance GHC.Classes.Eq Data.PhoneNumber.Number.CountryCode -- | Utilities for international phone numbers module Data.PhoneNumber.Util -- | Parse a phone number. -- -- The function is quite lenient and looks for a number in the input -- ByteString and does not check whether the string is definitely -- only a phone number. To do this, it ignores punctuation and -- white-space, as well as any text before the number (e.g. a leading -- "Tel: ") and trims the non-number bits. It will accept a -- number in any format (E164, national, international etc.), assuming it -- can be interpreted with the default Region supplied. It also -- attempts to convert any alpha characters into digits if it thinks this -- is a vanity number of the type "1800 MICROSOFT". -- -- The input can contain formatting such as +, ( and -- -, as well as a phone number extension. It can also be -- provided in RFC3966 format. -- -- Note that validation of whether the number is actually a valid number -- for a particular region is not performed. This can be done separately -- with isValidNumber. -- -- Returns an error if the string is not considered to be a viable phone -- number (e.g. too few or too many digits) or if no Region was -- supplied and the number is not in international format (does not start -- with '+'). parseNumber :: ParseMode -> Maybe Region -> ByteString -> Either ErrorType PhoneNumber -- | How much information to retain when parsing data ParseMode -- | Canonicalize the phone number such that different representations can -- be easily compared, no matter what form it was originally entered in -- (e.g. national, international) Canonicalize :: ParseMode -- | Record context about the number being parsed, such as rawInput, -- countryCodeSource, and preferredDomesticCarrierCode KeepRawInput :: ParseMode -- | Phone number parsing error data ErrorType -- | The number did not contain a country code and there was no default -- region supplied, or the number contained an invalid country code InvalidCountryCodeError :: ErrorType -- | Does not look like a phone number NotANumber :: ErrorType -- | Input starts with an International Direct Dialing prefix, but ends too -- shortly thereafter TooShortAfterIdd :: ErrorType -- | The National Significant Number is too short TooShortNsn :: ErrorType -- | The National Significant Number is too long TooLongNsn :: ErrorType -- | Formats a phone number in the specified PhoneNumberFormat using -- default rules. Note that this does not promise to produce a phone -- number that the user can dial from where they are - as we do not -- currently support a more abbreviated format, such as for users in the -- same area who could potentially dial the number without area code. formatNumber :: PhoneNumberFormat -> PhoneNumber -> ByteString -- | How formatNumber should format a phone number data PhoneNumberFormat -- | Consistent with the definition in ITU-T Recommendation E.123. However -- we follow local conventions such as using '-' instead of -- whitespace as separators. E.g. "+41 44 668 1800". International :: PhoneNumberFormat -- | Consistent with E.123, and also following local conventions for -- separators. E.g. "044 668 1800". National :: PhoneNumberFormat -- | Same as International but with no formatting, e.g. -- "+41446681800". See -- https://en.wikipedia.org/wiki/E.164. E164 :: PhoneNumberFormat -- | Same as International but with all separating symbols replaced -- with a hyphen, and with any phone number extension appended with -- ";ext=". It will also have a prefix of "tel:" added, -- e.g. "tel:+41-44-668-1800". RFC3966 :: PhoneNumberFormat -- | Same as National but for dialing using the specified domestic -- carrier code. NationalWithCarrierCodeOverride :: ByteString -> PhoneNumberFormat -- | Same as National but use the phone number's -- preferredDomesticCarrierCode (which is only set if parsed with -- KeepRawInput). If a preferred carrier code is absent, the -- provided string is used as fallback. NationalWithCarrierCodeFallback :: ByteString -> PhoneNumberFormat -- | Format in such a way that it can be dialed from a mobile phone in a -- specific region. If the number cannot be reached from the region (e.g. -- some countries block toll-free numbers from being called outside of -- the country), will format to an empty string. ForMobileDialing :: Region -> Bool -> PhoneNumberFormat [$sel:from:International] :: PhoneNumberFormat -> Region -- | Whether to strip formatting as in E164. [$sel:withFormatting:International] :: PhoneNumberFormat -> Bool -- | Format for out-of-country dialing purposes. This takes care of the -- case of calling inside of NANPA and between Russia and Kazakhstan (who -- share the same country calling code). In those cases, no international -- prefix is used. For regions which have multiple international -- prefixes, formats as International. OutOfCountry :: Region -> Bool -> PhoneNumberFormat [$sel:from:International] :: PhoneNumberFormat -> Region -- | Attempt to keep alpha chars and grouping information, if -- rawInput is available. Setting this to True comes with a -- number of caveats: -- --
    --
  1. This will not produce good results if the country calling code is -- both present in rawInput and is the start of the -- national number. This is not a problem in the regions which typically -- use alpha numbers.
  2. --
  3. This will also not produce good results if rawInput has any -- grouping information within the first three digits of the national -- number, and if the function needs to strip preceding digits/words in -- rawInput before these digits. Normally people group the first -- three digits together so this is not a huge problem.
  4. --
[$sel:keepAlphaChars:International] :: PhoneNumberFormat -> Bool -- | Use rawInput verbatim if present, otherwise infer -- National, International, or OutOfCountry based on -- countryCodeSource. Original :: Region -> PhoneNumberFormat [$sel:from:International] :: PhoneNumberFormat -> Region -- | Compares two numbers for equality. A number can be provided as a -- string, in which case it is parsed without assuming its region. -- -- Returns ExactMatch if the country calling code, National -- Significant Number (NSN), presence of a leading zero for Italian -- numbers and any extension present are the same. -- -- Returns NsnMatch if either or both has no country calling code -- specified, and the NSNs and extensions are the same. -- -- Returns ShortNsnMatch if either or both has no country calling -- code specified, or the country calling code specified is the same, and -- one NSN could be a shorter version of the other number. This includes -- the case where one has an extension specified, and the other does not. -- -- Returns InvalidNumber if a number that was provided as a string -- could not be parsed. -- -- Returns NoMatch otherwise. -- -- For example, the numbers 1 345 657 1234 and 657 1234 -- are a ShortNsnMatch. The numbers 1 345 657 1234 and -- 345 657 are a NoMatch. Note that none of these numbers -- can be parsed by parseNumber without assuming a region. matchNumbers :: Either ByteString PhoneNumber -> Either ByteString PhoneNumber -> MatchType -- | Types of phone number matches. See matchNumbers. data MatchType InvalidNumber :: MatchType NoMatch :: MatchType ShortNsnMatch :: MatchType NsnMatch :: MatchType ExactMatch :: MatchType -- | Returns the region where a phone number is from. This could be used -- for geocoding at the region level. Only guarantees correct results for -- valid, full numbers (not short-codes, or invalid numbers). regionForNumber :: PhoneNumber -> Maybe (Either NonGeoRegion Region) -- | Gets the National Significant Number (NSN) of a phone number. Note an -- NSN doesn't contain a national prefix or any formatting. nationalSignificantNumber :: PhoneNumber -> ByteString -- | Tests whether a phone number is valid for a certain region (if -- unspecified, the region the number is from). Note this doesn't verify -- the number is actually in use, which is impossible to tell by just -- looking at a number itself. -- -- If the country calling code is not the same as the country calling -- code for the provided region, this immediately returns False. -- After this, the specific number pattern rules for the region are -- examined. -- -- Specifying a region may be useful for determining for example whether -- a particular number is valid for Canada, rather than just a valid -- NANPA number. On the other hand this may lead to undesirable results, -- for example numbers from British Crown dependencies such as the Isle -- of Man are considered invalid for the region "GB" (United -- Kingdom), since it has its own region code, "IM". -- -- Note that it only verifies whether the parsed, canonicalised number is -- valid: not whether a particular series of digits entered by the user -- is dialable from the region provided when parsing. For example, the -- number +41 (0) 78 927 2696 can be parsed into a number with -- country code "41" and National Significant Number -- "789272696". This is valid, while the original string is not -- dialable. isValidNumber :: Maybe (Either NonGeoRegion Region) -> PhoneNumber -> Bool -- | Gets the phone number type. Returns Unknown if invalid. numberType :: PhoneNumber -> PhoneNumberType -- | Type of a phone number. -- -- FixedLineOrMobile designates cases where it is impossible to -- distinguish between fixed-line and mobile numbers by looking at the -- phone number itself (e.g. the USA). -- -- TollFree designates freephone lines. -- -- SharedCost designates numbers where the cost of the call is -- shared between the caller and the recipient, and is hence typically -- less than for PremiumRate. See -- http://en.wikipedia.org/wiki/Shared_Cost_Service for more -- information. -- -- Voip designates Voice over IP numbers. This includes TSoIP -- (Telephony Service over IP). -- -- Uan designates "Universal Access Numbers" or "Company Numbers". -- They may be further routed to specific offices, but allow one number -- to be used for a company. -- -- Voicemail designates "Voice Mail Access Numbers". data PhoneNumberType FixedLine :: PhoneNumberType Mobile :: PhoneNumberType FixedLineOrMobile :: PhoneNumberType TollFree :: PhoneNumberType PremiumRate :: PhoneNumberType SharedCost :: PhoneNumberType Voip :: PhoneNumberType PersonalNumber :: PhoneNumberType Pager :: PhoneNumberType Uan :: PhoneNumberType Voicemail :: PhoneNumberType Unknown :: PhoneNumberType -- | Check whether a phone number is a possible number of a particular -- type. Pass the type Unknown to check whether a number is -- possible at all. -- -- For more specific types that don't exist in a particular region, this -- will return a result that isn't so useful; it is recommended that you -- use supportedTypesForRegion or -- supportedTypesForNonGeoEntity respectively before calling this -- function to determine you should pass a more specific type instead of -- Unknown. -- -- This function provides a more lenient check than isValidNumber -- in the following sense: -- --
    --
  1. It only checks the length of phone numbers. In particular, it -- doesn't check starting digits of the number.
  2. --
  3. If Unknown is provided, it doesn't attempt to figure out -- the type of the number, but uses general rules which apply to all -- types of phone numbers in a region. Therefore, it is much faster than -- isValidNumber.
  4. --
  5. For some numbers (particularly fixed-line), many regions have the -- concept of area code, which together with subscriber number constitute -- the National Significant Number. It is sometimes okay to dial only the -- subscriber number when dialing in the same area. This function will -- return IsPossibleLocalOnly if the subscriber-number-only version is -- passed in. On the other hand, because isValidNumber validates -- using information on both starting digits (for fixed line numbers, -- that would most likely be area codes) and length (obviously includes -- the length of area codes for fixed line numbers), it will return -- False for the subscriber-number-only version.
  6. --
possibleNumber :: PhoneNumberType -> PhoneNumber -> ValidationResult -- | Possible outcomes when testing if a PhoneNumber is possible. -- -- IsPossible means the number length matches that of valid -- numbers for this region. -- -- IsPossibleLocalOnly means the number length matches that of -- local numbers for this region only (i.e. numbers that may be able to -- be dialled within an area, but do not have all the information to be -- dialled from anywhere inside or outside the country). -- -- InvalidCountryCode means the number has an invalid country -- calling code. -- -- TooShort means the number is shorter than all valid numbers for -- this region. -- -- TooLong means the number is longer than all valid numbers for -- this region. -- -- InvalidLength means the number is longer than the shortest -- valid numbers for this region, shorter than the longest valid numbers -- for this region, and does not itself have a number length that matches -- valid numbers for this region. This can also be returned in the case -- when there are no numbers of a specific type at all for this region. data ValidationResult IsPossible :: ValidationResult IsPossibleLocalOnly :: ValidationResult InvalidCountryCode :: ValidationResult TooShort :: ValidationResult InvalidLength :: ValidationResult TooLong :: ValidationResult -- | Returns True if the number can be dialed from outside the -- region, or unknown. If the number can only be dialled from within the -- region, returns False. Does not check the number is a valid -- number. Note that, at the moment, this method does not handle short -- numbers (which are currently all presumed to not be diallable from -- outside their country). canBeInternationallyDialed :: PhoneNumber -> Bool -- | Tests whether a phone number has a geographical association. It checks -- if the number is associated with a certain region in the country to -- which it belongs. Note that this doesn't verify if the number is -- actually in use. isGeographicalNumber :: PhoneNumber -> Bool -- | A less expensive version of isGeographicalNumber if we already -- know the PhoneNumberType isGeographicalNumberType :: PhoneNumberType -> CountryCode -> Bool -- | Returns true if the number is a valid vanity (alpha) number such as -- "800 MICROSOFT". A valid vanity number will start with at -- least 3 digits and will have three or more alpha characters. This does -- not do region-specific checks - to work out if this number is actually -- valid for a region, you should use parseNumber and -- possibleNumber/isValidNumber. isAlphaNumber :: ByteString -> Bool -- | All geographical regions the library has metadata for supportedRegions :: Set Region -- | All global network calling codes (country calling codes for -- non-geographical entities) the library has metadata for supportedGlobalNetworkCallingCodes :: Set CountryCode -- | All country calling codes the library has metadata for, covering both -- non-geographical entities (global network calling codes) and those -- used for geographical entities. This could be used to populate a -- drop-down box of country calling codes for a phone-number widget, for -- instance. supportedCallingCodes :: Set CountryCode -- | Returns the types for a given region which the library has metadata -- for. Will not include FixedLineOrMobile (if numbers for this -- non-geographical entity could be classified as -- FixedLineOrMobile, both FixedLine and Mobile -- would be present) and Unknown. -- -- No types will be returned for invalid or unknown region codes. supportedTypesForRegion :: Region -> Set PhoneNumberType -- | Returns the types for a country-code belonging to a non-geographical -- entity which the library has metadata for. Will not include -- FixedLineOrMobile (if numbers for this non-geographical entity -- could be classified as FixedLineOrMobile, both FixedLine -- and Mobile would be present) and Unknown. -- -- No types will be returned for country calling codes that do not map to -- a known non-geographical entity. supportedTypesForNonGeoEntity :: CountryCode -> Set PhoneNumberType -- | An ISO 3166-1 alpha-2 country code in upper case. newtype Region Region :: ByteString -> Region -- | A "region" corresponding to non-geographical entities. The library -- internally uses the UN M.49 code "001" (meaning the world) -- for this. data NonGeoRegion Region001 :: NonGeoRegion -- | A country calling code (International Subscriber Dialing code, ISD -- code), e.g. 34 for Spain. -- -- Contrary to the name, doesn't always correspond to a unique country -- (e.g. 7 could be either Russia or Kazakhstan), or a country -- at all, and instead a non-geographical entity (e.g. 800 is a -- Universal International Freephone Service dialing code). newtype CountryCode CountryCode :: Int -> CountryCode -- | Returns the country calling code for a specific region. For example, -- this would be 1 for the United States, and 64 for -- New Zealand. countryCodeForRegion :: Region -> Maybe CountryCode -- | Returns the region code that matches the specific country code. Note -- that it is possible that several regions share the same country -- calling code (e.g. US and Canada), and in that case, only one of the -- regions (normally the one with the largest population) is returned. If -- the country calling code entered is valid but doesn't match a specific -- region (such as in the case of non-geographical calling codes like -- 800) Region001 will be returned. regionForCountryCode :: CountryCode -> Maybe (Either NonGeoRegion Region) -- | Returns a list of the region codes that match the specific country -- calling code. For non-geographical country calling codes, -- Region001 is returned. Also, in the case of no region code -- being found, the list is empty. regionsForCountryCode :: CountryCode -> [Either NonGeoRegion Region] -- | Checks if this is a region under the North American Numbering Plan -- Administration (NANPA). isNANPACountry :: Region -> Bool -- | Returns the mobile token for the provided country calling code if it -- has one, otherwise returns an empty string. A mobile token is a number -- inserted before the area code when dialing a mobile number from that -- country from abroad. countryMobileToken :: CountryCode -> ByteString -- | Returns the National Direct Dialling prefix (NDD prefix) for a -- specific region. For example, this would be "1" for the -- United States, and "0" for New Zealand. Note that this may -- contain symbols like '~' (which indicates a wait for a -- dialing tone). Returns an empty string if no national prefix is -- present. nddPrefixForRegion :: Bool -> Region -> ByteString -- | Attempts to extract a valid number from a phone number that is too -- long to be valid. Returns Nothing if no valid number could be -- extracted. truncateTooLongNumber :: PhoneNumber -> Maybe PhoneNumber -- | Converts all alpha characters in a number to their respective digits -- on a keypad, but retains existing formatting convertAlphaNumber :: ByteString -> ByteString -- | Normalizes a string of characters representing a phone number. See -- Normalize. normalizeNumber :: Normalize -> ByteString -> ByteString -- | How normalizeNumber should normalize a phone number data Normalize -- | Convert wide-ascii and arabic-indic numerals to European numerals, and -- strip punctuation and alpha characters Digits :: Normalize -- | Strip all characters which are not diallable on a mobile phone keypad -- (including all non-ASCII digits) Dialable :: Normalize -- | A decoded phone number. While internally it is a handle for the -- corresponding C++ object, for most intents and purposes it can be used -- as a record (using the PhoneNumber record pattern synonym) with -- the following structure: -- --
--   PhoneNumber
--   { extension :: !(Maybe ByteString)
--   , rawInput :: !(Maybe ByteString)
--   , preferredDomesticCarrierCode :: !(Maybe ByteString)
--   , nationalNumber :: !Word
--   , countryCode :: ! CountryCode
--   , italianLeadingZero :: !(Maybe Bool)
--   , countryCodeSource :: !(Maybe CountryCodeSource)
--   , numberOfLeadingZeros :: !(Maybe Int)
--   }
--   
data PhoneNumber instance GHC.Generics.Generic Data.PhoneNumber.Util.Region instance Data.Data.Data Data.PhoneNumber.Util.Region instance Control.DeepSeq.NFData Data.PhoneNumber.Util.Region instance Data.String.IsString Data.PhoneNumber.Util.Region instance GHC.Read.Read Data.PhoneNumber.Util.Region instance GHC.Show.Show Data.PhoneNumber.Util.Region instance GHC.Classes.Ord Data.PhoneNumber.Util.Region instance GHC.Classes.Eq Data.PhoneNumber.Util.Region instance Control.DeepSeq.NFData Data.PhoneNumber.Util.NonGeoRegion instance GHC.Generics.Generic Data.PhoneNumber.Util.NonGeoRegion instance Data.Data.Data Data.PhoneNumber.Util.NonGeoRegion instance GHC.Read.Read Data.PhoneNumber.Util.NonGeoRegion instance GHC.Show.Show Data.PhoneNumber.Util.NonGeoRegion instance GHC.Classes.Ord Data.PhoneNumber.Util.NonGeoRegion instance GHC.Classes.Eq Data.PhoneNumber.Util.NonGeoRegion instance Control.DeepSeq.NFData Data.PhoneNumber.Util.Normalize instance GHC.Generics.Generic Data.PhoneNumber.Util.Normalize instance Data.Data.Data Data.PhoneNumber.Util.Normalize instance GHC.Read.Read Data.PhoneNumber.Util.Normalize instance GHC.Show.Show Data.PhoneNumber.Util.Normalize instance GHC.Classes.Ord Data.PhoneNumber.Util.Normalize instance GHC.Classes.Eq Data.PhoneNumber.Util.Normalize instance Control.DeepSeq.NFData Data.PhoneNumber.Util.ErrorType instance GHC.Generics.Generic Data.PhoneNumber.Util.ErrorType instance Data.Data.Data Data.PhoneNumber.Util.ErrorType instance GHC.Read.Read Data.PhoneNumber.Util.ErrorType instance GHC.Show.Show Data.PhoneNumber.Util.ErrorType instance GHC.Classes.Ord Data.PhoneNumber.Util.ErrorType instance GHC.Classes.Eq Data.PhoneNumber.Util.ErrorType instance Control.DeepSeq.NFData Data.PhoneNumber.Util.ParseMode instance GHC.Generics.Generic Data.PhoneNumber.Util.ParseMode instance Data.Data.Data Data.PhoneNumber.Util.ParseMode instance GHC.Read.Read Data.PhoneNumber.Util.ParseMode instance GHC.Show.Show Data.PhoneNumber.Util.ParseMode instance GHC.Classes.Ord Data.PhoneNumber.Util.ParseMode instance GHC.Classes.Eq Data.PhoneNumber.Util.ParseMode