packages feed

mdoc 0.1.1.3 → 0.1.1.4

raw patch · 5 files changed

+35/−27 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

mdoc.cabal view
@@ -1,6 +1,6 @@ cabal-version:      1.18 name:               mdoc-version:            0.1.1.3+version:            0.1.1.4 license:            AGPL-3 license-file:       COPYING maintainer:         Pat Brisbin
src/Autodocodec/Schema/Mdoc.hs view
@@ -18,9 +18,9 @@ --   } -- -- instance HasCodec Person where---   codec = object "Person" $ Person---     <$> requiredField "name" "Their name" .= (.name)---     <*> requiredField "age" "Their age" .= (.age)+--   codec = object \"Person\" $ Person+--     \<$> requiredField "name" "Their name" .= (.name)+--     \<*> requiredField "age" "Their age" .= (.age) -- -- schema :: JSONSchema -- schema = jsonSchemaViaCodec @Person@@ -29,11 +29,11 @@ -- @ -- .\" Generates this mandoc source -- .Sh DESCIPTION--- .Bl ...--- .It Cm name : string--- Their name+-- .Bl -tag -width indent -- .It Cm age : number -- Their age+-- .It Cm name : string+-- Their name -- .El -- @ --@@ -41,10 +41,11 @@ -- -- @ -- DESCRIPTION---   name : string      Their name -- --   age : object      Their age --+--   name : string      Their name+-- -- @ module Autodocodec.Schema.Mdoc   ( addToMan5@@ -71,7 +72,7 @@ import Mdoc.Gen.Optionality import Mdoc.Optics --- |+-- | Add configuration values to a 'Man5' -- -- This uses 'getConfigs' without prefix, resulting in output like: --@@ -83,19 +84,23 @@ -- A bar field that is a number -- @ ----- for an object, or+-- for top-level object, or -- -- @ -- : string -- @ ----- for a primitive+-- for a top-level primitive+--+-- If the 'JSONSchema' has a top-level @$comment@, and the 'Man5' doesn't yet+-- have a description, that will also be set. addToMan5 :: JSONSchema -> Man5 -> Man5 addToMan5 js m =   m     & field @"name" % field @"description" %~ getComment js     & field @"configs" <>~ getConfigs Nothing js +-- | Add to a 'Man5' from the schema of any @a@ with 'HasCodec' addToMan5ViaCodec :: forall a. HasCodec a => Man5 -> Man5 addToMan5ViaCodec = addToMan5 $ jsonSchemaViaCodec @a 
src/Env/Mdoc.hs view
@@ -13,8 +13,8 @@ -- -- This input parser -- parser :: Parser Error Options -- parser = Option---   <$> var str "FOO" (help "Use foo")---   <*> switch "DEBUG" (help "Log more verbosely")+--   \<$> var str \"FOO\" (help "Use foo")+--   \<*> switch \"DEBUG\" (help "Log more verbosely") -- @ -- -- @@@ -23,10 +23,10 @@ -- The following environment variables affect the execution of -- .Nm -- :--- .Bl ...--- .It Cm FOO--- Use foo+-- .Bl -tag -width \"DEBUG\" -- .It Cm DEBUG+-- Use foo+-- .It Cm FOO -- Log more verbosely -- @ --@@ -34,11 +34,11 @@ -- -- @ -- ENVIRONMENT---   The following environment variable affect the execution of thing:------   FOO   Use foo+--   The following environment variables affect the execution of thing: -- --   DEBUG Log more verbosely+--+--   FOO   Use foo -- @ -- -- For something more complete, see "Mdoc.GenSpec".@@ -56,6 +56,7 @@ import Mdoc.Gen.Optionality import Mdoc.Optics +-- | Add environment variables to a 'Man1' addToMan1 :: Parser e a -> Man1 -> Man1 addToMan1 p m = m & field @"environment" <>~ envs  where
src/OptEnvConf/Mdoc.hs view
@@ -13,9 +13,9 @@ -- -- This input parser -- parser :: Parser Options -- parser = Option---   <$> setting [short 'C', long "context", help "Include context" <> metavar "num"]---   <*> setting [short 'v', long "debug", env "DEBUG", help "Log more verbosely"]---   <*> some1 (setting [argument, metavar "file"])+--   \<$> setting [short 'C', long "context", help "Include context" <> metavar "num"]+--   \<*> setting [short 'v', long "debug", env \"DEBUG\", help "Log more verbosely"]+--   \<*> some1 (setting [argument, metavar "file"]) -- @ -- -- @@@ -28,7 +28,7 @@ -- .Op Ar file ... -- .Sh DESCRIPTION -- The options are as follows:--- .Bl ...+-- .Bl -tag -width indent -- .It Fl C Ar num -- Include context -- .It Fl v | Fl Fl verbose@@ -37,8 +37,10 @@ -- .El -- .Sh ENVIRONMENT -- The following environment variables affect the execution of+-- .Bl -tag -width \"DEBUG\" -- .It Cm DEBUG -- Log more verbosely+-- .El -- .Sh EXIT STATUS -- .Ex -std -- @@@ -59,7 +61,7 @@ --   file -- -- ENVIRONMENT---   The following environment variable affect the execution of thing:+--   The following environment variables affect the execution of thing: -- --   DEBUG Log more verbosely --
src/Options/Applicative/Mdoc.hs view
@@ -15,9 +15,9 @@ -- -- This input parser -- parser :: Parser Options -- parser = Option---   <$> option str (short 'C' <> long "context" <> help "Include context" <> metavar "num"---   <*> switch (short 'v' <> long "debug" <> help "Log more verbosely")---   <*> some1 (argument (metavar "file"))+--   \<$> option str (short 'C' <> long "context" <> help "Include context" <> metavar "num"+--   \<*> switch (short 'v' <> long "debug" <> help "Log more verbosely")+--   \<*> some1 (argument (metavar "file")) -- @ -- -- @