The phone-numbers package

[Tags:bsd3, library, test]

Basic phone number parsing, largely incomplete, please submit a pull request or issue if you'd like more exposed.


[Skip to Readme]

Properties

Versions 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.1.0
Dependencies base (==4.*), bytestring [details]
License BSD3
Author Christian Marie <christian@ponies.io>
Maintainer Christian Marie <christian@ponies.io>
Category Data
Home page https://github.com/christian-marie/phone-numbers
Bug tracker https://github.com/christian-marie/phone-numbers
Source repository head: git clone https://github.com/christian-marie/phone-numbers
Uploaded Wed Jan 18 23:49:18 UTC 2017 by ChristianMarie
Distributions NixOS:0.1.0
Downloads 392 total (54 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for phone-numbers

Readme for phone-numbers-0.1.0

phone-numbers - Parse phone numbers with Google's libphonenumber

Travis Status

--
-- Copyright © 2016 Christian Marie <christian@ponies.io>
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
-- the 3-clause BSD licence.
--

{-# LANGUAGE OverloadedStrings #-}

import Data.PhoneNumber
import Control.Monad
import Data.Monoid
import qualified Data.ByteString.Char8 as S

main :: IO ()
main = forever $ do
    l <- S.getLine

    S.putStrLn "Number:"
    print $ parsePhoneNumber l "AU"
    print (refType <$> parsePhoneNumberRef l "AU")
    S.putStrLn $ "Characters keypad normalised: " <> convertAlphaCharacters l