on master help sign in
Remove dead code
commit8d491e4772f6678208b5fd0ee3e8180788a7a751 authorSimon Hengel <sol@typeful.net> dateSun 19 Aug 2018, 11:40 (8 years ago) parent11f9f3f
1 file changed+1−21
src/Data/Yaml/Internal.hs+1−21
src/Data/Yaml/Internal.hs+1−21
@@ -20,9 +20,7 @@ import Control.Applicative ((<$>), Applicative(..))
2020#endif
2121import Control.Applicative ((<|>))
2222import Control.Exception
23−import Control.Monad (liftM, ap, when, unless)
24−import Control.Monad.IO.Class (MonadIO, liftIO)
25−import Control.Monad.Trans.Class (MonadTrans, lift)
23+import Control.Monad (when, unless)
2624import Control.Monad.Trans.Resource (ResourceT, runResourceT)
2725import Control.Monad.RWS
2826import Data.Aeson
@@ -114,24 +112,6 @@ prettyPrintParseException pe = case pe of
114112 ]
115113 CyclicIncludes -> "Cyclic includes"
116114
117−newtype PErrorT m a = PErrorT { runPErrorT :: m (Either ParseException a) }
118−instance Monad m => Functor (PErrorT m) where
119− fmap = liftM
120−instance Monad m => Applicative (PErrorT m) where
121− pure = PErrorT . return . Right
122− (<*>) = ap
123−instance Monad m => Monad (PErrorT m) where
124− return = pure
125− (PErrorT m) >>= f = PErrorT $ do
126− e <- m
127− case e of
128− Left e' -> return $ Left e'
129− Right a -> runPErrorT $ f a
130−instance MonadTrans PErrorT where
131− lift = PErrorT . liftM Right
132−instance MonadIO m => MonadIO (PErrorT m) where
133− liftIO = liftIO
134−
135115defineAnchor :: Value -> String -> ConduitM e o Parse ()
136116defineAnchor value name = modify $ Map.insert name value
137117