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


-- | Compute and verify checksums of ISBN, IBAN, etc.
--   
--   Compute and verify checksums of various identifiers, such as IBAN,
--   ISBN, EAN, Germany's Citizen Card.
@package checksum
@version 0.0


-- | International Standard Book Number
--   
--   
--   <a>https://en.wikipedia.org/wiki/International_Standard_Book_Number</a>
--   
--   Covers only ISBN-10. For ISBN-13 simply use <a>Math.Checksum.EAN</a>.
module Math.Checksum.ISBN

-- | <pre>
--   checksum "346811124" == Success 10
--   </pre>
checksum :: String -> Exceptional String Int

-- | <pre>
--   valid "346811124X" == Nothing
--   valid "3468111240" == Just "check sum does not match"
--   </pre>
valid :: String -> Maybe String


-- | International Bank Account Number
--   
--   <a>https://en.wikipedia.org/wiki/International_Bank_Account_Number</a>
module Math.Checksum.IBAN

-- | <pre>
--   checksum "DE" "210501700012345678" == Success 68
--   </pre>
checksum :: String -> String -> Exceptional String Int

-- | <pre>
--   valid "DE68210501700012345678" == Nothing
--   valid "DE68210501700012345679" == Just "check sum does not match"
--   </pre>
valid :: String -> Maybe String


-- | European Article Number
--   
--   <a>https://en.wikipedia.org/wiki/International_Article_Number</a>
module Math.Checksum.EAN

-- | <pre>
--   checksum "400638129240" == Success 5
--   </pre>
checksum :: String -> Exceptional String Int

-- | <pre>
--   valid "4006381292405" == Nothing
--   valid "4006381292406" == Just "check sum does not match"
--   </pre>
valid :: String -> Maybe String


-- | Personalausweisnummer
--   
--   <a>https://de.wikipedia.org/wiki/Ausweisnummer</a>
module Math.Checksum.CitizenCard.Germany

-- | <pre>
--   construct city no birthDate expiration
--   construct 1234 56789 980706 180706 == "1234567897D&lt;&lt;9807062&lt;1807066&lt;&lt;&lt;&lt;&lt;&lt;&lt;8"
--   </pre>
construct :: Int -> Int -> Int -> Int -> String
