From ee09f262f9b8c7c6a4042071cdfff3e22adbef86 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Feb 2017 15:10:51 +0100 Subject: Establish framework --- lib/Postdelay/Utils.hs | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 lib/Postdelay/Utils.hs (limited to 'lib/Postdelay/Utils.hs') diff --git a/lib/Postdelay/Utils.hs b/lib/Postdelay/Utils.hs deleted file mode 100644 index d716b4d..0000000 --- a/lib/Postdelay/Utils.hs +++ /dev/null @@ -1,21 +0,0 @@ -{-# LANGUAGE FlexibleContexts #-} - -module Postdelay.Utils - ( hoistParsecT - ) where - -import Control.Monad.Error.Class - -import Data.Functor -import Data.Either - -import Data.Functor.Identity -import Text.Parsec.Prim -import Text.Parsec.Error - -hoistParsecT :: (Monad m, Stream s Identity t, Stream s m t) => ParsecT s u Identity a -> ParsecT s u m a -hoistParsecT p = do - st <- getParserState - let res = runParser p' undefined "" undefined - p' = setParserState st >> ((,) <$> getState <*> p) - either (fail . show) (\(st', res) -> putState st' $> res) $ res -- cgit v1.2.3