Distribution.ReadE

Cabal-2.4.0.1: A framework for packaging Haskell software

Copyright | Jose Iborra 2008
License | BSD3
Maintainer | cabal-devel@haskell.org
Portability | portable
Safe Haskell | None
Language | Haskell2010

Distribution.ReadE

Contents

- ReadE
- Projections

Description

Simple parsing with failure

Synopsis

- newtype ReadE a = ReadE {
  - runReadE :: String -> Either ErrorMsg a
  }
- succeedReadE :: (String -> a) -> ReadE a
- failReadE :: ErrorMsg -> ReadE a
- parseReadE :: ReadE a -> ReadP r a
- readEOrFail :: ReadE a -> String -> a
- readP_to_E :: (String -> ErrorMsg) -> ReadP a a -> ReadE a
- parsecToReadE :: (String -> ErrorMsg) -> ParsecParser a -> ReadE a

# ReadE

newtype ReadE a #

Parser with simple error reporting

Constructors

ReadE |
Fields runReadE :: String -> Either ErrorMsg a

Instances

Functor ReadE # |
Instance details Defined in Distribution.ReadE Methods fmap :: (a -> b) -> ReadE a -> ReadE b Source # (<$) :: a -> ReadE b -> ReadE a Source #

succeedReadE :: (String -> a) -> ReadE a #

failReadE :: ErrorMsg -> ReadE a #

# Projections

parseReadE :: ReadE a -> ReadP r a #

readEOrFail :: ReadE a -> String -> a #

readP_to_E :: (String -> ErrorMsg) -> ReadP a a -> ReadE a #

parsecToReadE :: (String -> ErrorMsg) -> ParsecParser a -> ReadE a #