{-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-duplicate-exports #-}
module Autodocodec.Yaml
(
encodeYamlViaCodec,
eitherDecodeYamlViaCodec,
readYamlConfigFile,
readFirstYamlConfigFile,
renderColouredSchemaViaCodec,
renderColouredSchemaVia,
renderPlainSchemaViaCodec,
renderPlainSchemaVia,
schemaChunksViaCodec,
schemaChunksVia,
jsonSchemaChunks,
toYamlViaCodec,
toYamlVia,
module Autodocodec.Yaml.Schema,
module Autodocodec.Yaml.IO,
module Autodocodec.Yaml.Encode,
)
where
import Autodocodec
import Autodocodec.Yaml.Encode
import Autodocodec.Yaml.IO
import Autodocodec.Yaml.Schema
import Data.ByteString
import qualified Data.Yaml as Yaml
import qualified Data.Yaml.Builder as Yaml
encodeYamlViaCodec :: HasCodec a => a -> ByteString
encodeYamlViaCodec :: forall a. HasCodec a => a -> ByteString
encodeYamlViaCodec = forall a. ToYaml a => a -> ByteString
Yaml.toByteString forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. a -> Autodocodec a
Autodocodec
eitherDecodeYamlViaCodec :: HasCodec a => ByteString -> Either Yaml.ParseException a
eitherDecodeYamlViaCodec :: forall a. HasCodec a => ByteString -> Either ParseException a
eitherDecodeYamlViaCodec = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Autodocodec a -> a
unAutodocodec forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. FromJSON a => ByteString -> Either ParseException a
Yaml.decodeEither'