isbn-1.1.0.3: ISBN Validation and Manipulation
Safe HaskellSafe-Inferred
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.

To create ISBN values without validation, use the unsafeToISBN10 and unsafeToISBN13 functions 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

Instances details
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 #