on master help sign in
Exporting YamlException
commit906eb68d46d2e7663909ca5fa57575f94eafbf7b authorMichael Snoyman <michael@snoyman.com> dateMon 27 Sep 2010, 19:24 (16 years ago) parent7196316
1 file changed+4−3
Text/Libyaml.hs+4−3
Text/Libyaml.hs+4−3
@@ -21,6 +21,8 @@ module Text.Libyaml
2121 , decode
2222 , encodeFile
2323 , decodeFile
24+ -- * Exception
25+ , YamlException (..)
2426 ) where
2527
2628import qualified Data.ByteString.Internal as B
@@ -470,8 +472,7 @@ decode bs i = do
470472 liftIO $ withForeignPtr fp c_yaml_parser_delete -- FIXME finally
471473 return a
472474
473−-- FIXME decodeFile :: MonadCatchIO m => FilePath -> Enumerator Event m a
474−decodeFile :: FilePath -> Enumerator Event IO a
475+decodeFile :: MonadIO m => FilePath -> Enumerator Event m a
475476decodeFile file i = do
476477 fp <- liftIO $ mallocForeignPtrBytes parserSize
477478 res <- liftIO $ withForeignPtr fp c_yaml_parser_initialize
@@ -496,7 +497,7 @@ decodeFile file i = do
496497 liftIO $ withForeignPtr fp c_yaml_parser_delete -- FIXME finally
497498 return a
498499
499−runParser :: MonadCatchIO m
500+runParser :: MonadIO m
500501 => ForeignPtr ParserStruct
501502 -> Enumerator Event m a
502503runParser fp (Continue k) = do