GroteTrap-0.5: Parser and selection library for expression languages.

Language.GroteTrap.Util

Description

Utility functions.

This module re-exports module Control.Monad.Error so that fromError can be used as Monad m => m a -> a.

Synopsis

Documentation

fromError :: Either String a -> aSource

Either returns the value or throws an exception.

run :: Monad m => String -> GenParser tok () a -> [tok] -> m aSource

run sourceName p input runs the specified parser on the input, returning the result in a monad.