extra-1.5.3: Extra functions I use.

Safe Haskell | Safe
Language | Haskell2010

Text.Read.Extra

Description

This module provides Text.Read with functions added in later versions.

Synopsis

- module Text.Read
- readEither :: Read a => String -> Either String a
- readMaybe :: Read a => String -> Maybe a

# Documentation

module Text.Read

readEither :: Read a => String -> Either String a #

Parse a string using the `Read` instance. Succeeds if there is exactly one valid result. A `Left` value indicates a parse error.

Since: 4.6.0.0

readMaybe :: Read a => String -> Maybe a #

Parse a string using the `Read` instance. Succeeds if there is exactly one valid result.

Since: 4.6.0.0