isbn-1.0.0.0: ISBN Validation and Manipulation

Safe HaskellSafe
LanguageHaskell2010

Data.ISBN.Types

Synopsis

Documentation

data ISBN Source #

Data type for representing ISBN values. Values of this type should be created safely using validateISBN, which will produce ISBN10 or ISBN13 values after validating the input.

The validateISBN10 and validateISBN13 functions can also be used to only attempt to create ISBNs of a specific type.

When importing this data type, it is recommended not expose the constructors, and instead use unsafeToISBN10 or unsafeToISBN13 to coerce Text values into ISBN values.

Constructors

ISBN10 Text

An ISBN-10 value. Consists of 9 digits followed by a base-11 check digit (0-9 or 'X').

ISBN13 Text

An ISBN-13 value. Consists of 12 digits followed by a base-10 check digit (0-9).

Instances
Eq ISBN Source # 
Instance details

Defined in Data.ISBN.Types

Methods

(==) :: ISBN -> ISBN -> Bool #

(/=) :: ISBN -> ISBN -> Bool #

Show ISBN Source # 
Instance details

Defined in Data.ISBN.Types

Methods

showsPrec :: Int -> ISBN -> ShowS #

show :: ISBN -> String #

showList :: [ISBN] -> ShowS #