prelate 0.5.1.0 → 0.6.0.0
raw patch · 3 files changed
+60/−40 lines, 3 filesdep +zeugmadep ~incipitPVP ok
version bump matches the API change (PVP)
Dependencies added: zeugma
Dependency ranges changed: incipit
API changes (from Hackage documentation)
- Prelate.App: runApp :: Sem AppStack () -> IO ()
+ Prelate.App: runApp :: Sem AppStack a -> IO a
- Prelate.App: runAppLevel :: Severity -> Sem AppStack () -> IO ()
+ Prelate.App: runAppLevel :: Severity -> Sem AppStack a -> IO a
Files
- lib/Prelate/App.hs +13/−6
- prelate.cabal +42/−34
- readme.md +5/−0
lib/Prelate/App.hs view
@@ -16,6 +16,7 @@ import Incipit import Log (Severity (Info), interpretLogStderrLevelConc) import Polysemy.Chronos (ChronosTime, interpretTimeChronos)+import System.Exit (exitFailure) import System.IO (stderr) -- | The default stack for a Prelate app.@@ -32,6 +33,11 @@ printError msg = Text.hPutStrLn stderr ("Error: " <> msg) +exitError :: Text -> IO a+exitError msg = do+ printError msg+ exitFailure+ -- | Run the default 'AppStack' with the specified log level and return a potential error as 'Left'. runAppLevelE :: Severity ->@@ -45,16 +51,17 @@ interpretLogStderrLevelConc (Just level) . interpretTimeChronos --- | Run the default 'AppStack' with the specified log level and print an potential error to stderr.+-- | Run the default 'AppStack' with the specified log level and print a potential error to stderr, exiting with failure+-- code. runAppLevel :: Severity ->- Sem AppStack () ->- IO ()+ Sem AppStack a ->+ IO a runAppLevel level =- leftA printError <=< runAppLevelE level+ leftA exitError <=< runAppLevelE level --- | Run the default 'AppStack' and print an potential error to stderr.-runApp :: Sem AppStack () -> IO ()+-- | Run the default 'AppStack' and print an potential error to stderr, exiting with failure code.+runApp :: Sem AppStack a -> IO a runApp = runAppLevel Info
prelate.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.2 --- This file has been generated from package.yaml by hpack version 0.35.0.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack name: prelate-version: 0.5.1.0+version: 0.6.0.0 synopsis: A Prelude description: See https://hackage.haskell.org/package/prelate/docs/Prelate.html category: Prelude@@ -13,10 +13,12 @@ bug-reports: https://github.com/tek/prelate/issues author: Torsten Schmits maintainer: hackage@tryp.io-copyright: 2022 Torsten Schmits+copyright: 2023 Torsten Schmits license: BSD-2-Clause-Patent license-file: LICENSE build-type: Simple+extra-source-files:+ readme.md source-repository head type: git@@ -34,6 +36,10 @@ Prelate.Json Prelate.Prelude Process+ other-modules:+ Paths_prelate+ autogen-modules:+ Paths_prelate reexported-modules: Control.Concurrent.STM , Control.Concurrent.STM.TArray@@ -79,78 +85,79 @@ , Queue , Sync , Time+ , Zeugma hs-source-dirs: lib default-extensions: AllowAmbiguousTypes ApplicativeDo- BangPatterns- BinaryLiterals BlockArguments- ConstraintKinds DataKinds DefaultSignatures DeriveAnyClass- DeriveDataTypeable- DeriveFoldable- DeriveFunctor- DeriveGeneric- DeriveLift- DeriveTraversable DerivingStrategies DerivingVia DisambiguateRecordFields- DoAndIfThenElse DuplicateRecordFields- EmptyCase- EmptyDataDecls- ExistentialQuantification- FlexibleContexts- FlexibleInstances FunctionalDependencies GADTs- GeneralizedNewtypeDeriving- InstanceSigs- KindSignatures LambdaCase LiberalTypeSynonyms- MultiParamTypeClasses MultiWayIf- NamedFieldPuns OverloadedLabels OverloadedLists OverloadedStrings PackageImports PartialTypeSignatures- PatternGuards PatternSynonyms- PolyKinds QuantifiedConstraints QuasiQuotes- RankNTypes RecordWildCards RecursiveDo RoleAnnotations- ScopedTypeVariables- StandaloneDeriving TemplateHaskell- TupleSections- TypeApplications TypeFamilies TypeFamilyDependencies- TypeOperators- TypeSynonymInstances UndecidableInstances UnicodeSyntax ViewPatterns- ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Widentities -Wunused-packages+ BangPatterns+ BinaryLiterals+ ConstraintKinds+ DeriveDataTypeable+ DeriveFoldable+ DeriveFunctor+ DeriveGeneric+ DeriveLift+ DeriveTraversable+ DoAndIfThenElse+ EmptyCase+ EmptyDataDecls+ ExistentialQuantification+ FlexibleContexts+ FlexibleInstances+ GeneralizedNewtypeDeriving+ InstanceSigs+ KindSignatures+ MultiParamTypeClasses+ NamedFieldPuns+ PatternGuards+ PolyKinds+ RankNTypes+ ScopedTypeVariables+ StandaloneDeriving+ TupleSections+ TypeApplications+ TypeOperators+ TypeSynonymInstances+ ghc-options: -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages build-depends: aeson >=2.0 , base >=4.13 && <4.18 , exon ==1.4.* , extra >=1.7.10 && <1.8 , generic-lens >=2.2- , incipit ==0.7.*+ , incipit ==0.8.* , microlens ==0.4.* , microlens-ghc ==0.4.* , polysemy-chronos ==0.6.*@@ -160,4 +167,5 @@ , polysemy-resume ==0.7.* , polysemy-time ==0.6.* , template-haskell+ , zeugma ==0.8.* default-language: Haskell2010
+ readme.md view
@@ -0,0 +1,5 @@+# About++A `Prelude` based on [incipit].++[incipit]: https://hackage.haskell.org/package/incipit