phone-numbers: Haskell bindings to the libphonenumber library

[ bsd3, data, library ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Modules

[Last Documentation]

  • Data
    • Data.PhoneNumber
      • Data.PhoneNumber.LowLevel

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.1.0, 0.1.1, 0.2.0
Change log changelog.md
Dependencies base (>=4 && <5), bytestring [details]
License BSD-3-Clause
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 repo head: git clone https://github.com/christian-marie/phone-numbers
Uploaded by ChristianMarie at 2019-10-11T09:55:43Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 5668 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2019-10-11 [all 3 reports]

Readme for phone-numbers-0.2.0

[back to package description]

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