diff --git a/GroteTrap.cabal b/GroteTrap.cabal
--- a/GroteTrap.cabal
+++ b/GroteTrap.cabal
@@ -1,5 +1,5 @@
 Name:           GroteTrap
-Version:        0.4
+Version:        0.5
 Synopsis:       Parser and selection library for expression languages.
 Description:    Allows quick definition of expression languages. You get a parser for free, as well as conversion from text selection to tree selection and back.
 Homepage:       http://www.haskell.org/haskellwiki/GroteTrap
@@ -24,5 +24,6 @@
                     Language.GroteTrap.Lexer
                     Language.GroteTrap.Unparse
                     Language.GroteTrap.ShowTree
+                    Language.GroteTrap.Util
   Other-Modules:    Language.GroteTrap.ParseTree
                     Language.GroteTrap.Parser
diff --git a/Language/GroteTrap/Util.hs b/Language/GroteTrap/Util.hs
new file mode 100644
--- /dev/null
+++ b/Language/GroteTrap/Util.hs
@@ -0,0 +1,17 @@
+-- | Utility functions.
+--
+-- This module re-exports module Control.Monad.Error so that 'fromError' can be used as @Monad m => m a -> a@.
+module Language.GroteTrap.Util (fromError, run, module Control.Monad.Error) where
+
+import Text.ParserCombinators.Parsec
+import Control.Monad.Error ()
+
+-- | Either returns the value or throws an exception.
+fromError :: Either String a -> a
+fromError = either error id
+
+-- | @run sourceName p input@ runs the specified parser on the input, returning the result in a monad.
+run :: Monad m => String -> GenParser tok () a -> [tok] -> m a
+run name p input = case runParser p () name input of
+  Left err  -> fail ("parse error at " ++ show err)
+  Right v   -> return v
