on master help sign in
Switch to @since for docs
commitf60ce3c778889c815aed8f4bec34baed7be768b9 authorMichael Snoyman <michael@snoyman.com> dateThu 28 Jun 2018, 12:10 (8 years ago) parent06a7521
1 file changed+4−4
Data/Yaml.hs+4−4
Data/Yaml.hs+4−4
@@ -173,7 +173,7 @@ decodeFile fp = decodeHelper (Y.decodeFile fp) >>= either throwIO (return . eith
173173
174174-- | A version of 'decodeFile' which should not throw runtime exceptions.
175175--
176−-- Since 0.8.4
176+-- @since 0.8.4
177177decodeFileEither
178178 :: FromJSON a
179179 => FilePath
@@ -187,7 +187,7 @@ decodeEither bs = unsafePerformIO
187187
188188-- | More helpful version of 'decodeEither' which returns the 'YamlException'.
189189--
190−-- Since 0.8.3
190+-- @since 0.8.3
191191decodeEither' :: FromJSON a => ByteString -> Either ParseException a
192192decodeEither' = either Left (either (Left . AesonException) Right)
193193 . unsafePerformIO
@@ -196,13 +196,13 @@ decodeEither' = either Left (either (Left . AesonException) Right)
196196
197197-- | A version of 'decodeEither'' lifted to MonadThrow
198198--
199−-- Since 0.8.31
199+-- @since 0.8.31
200200decodeThrow :: (MonadThrow m, FromJSON a) => ByteString -> m a
201201decodeThrow = either throwM return . decodeEither'
202202
203203-- | A version of 'decodeFileEither' lifted to MonadIO
204204--
205−-- Since 0.8.31
205+-- @since 0.8.31
206206decodeFileThrow :: (MonadIO m, FromJSON a) => FilePath -> m a
207207decodeFileThrow f = liftIO $ decodeFileEither f >>= either throwIO return
208208