packages feed

magicbane 0.5.0 → 0.5.1

raw patch · 2 files changed

+6/−16 lines, 2 files

Files

library/Magicbane/Validation.hs view
@@ -1,20 +1,10 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE OverloadedStrings, UnicodeSyntax #-} --- | Integrates the refinement types from the refined library with aeson.+-- | This module used to integrate the refinement types from the Refined library with aeson.+-- | This integration is now included in Refined library (as of 0.4), but we keep the re-export for convenience. module Magicbane.Validation (   module Refined ) where  import           Refined-import           Data.Aeson--instance ToJSON α ⇒ ToJSON (Refined ρ α) where-  toJSON = toJSON . unrefine--instance (FromJSON α, Predicate ρ α) ⇒ FromJSON (Refined ρ α) where-  parseJSON x = do-    res ← parseJSON x-    case refine res of-      Right v → return v-      Left e → fail $ show e
magicbane.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 9ccf29b1676abbc411ffa8622c3786b3bf156e6c1d2e17720bbc4717a5179941+-- hash: 1afdc0f448841cadb4ff9ee3c0689ee0853c73a6defdcb75087ad67fcdb9697d  name:           magicbane-version:        0.5.0+version:        0.5.1 synopsis:       A web framework that integrates Servant, RIO, EKG, fast-logger, wai-cli…  description:    Inspired by Dropwizard, Magicbane provides a packaged framework for developing web services using the best available libraries, including Servant, RIO, Aeson, EKG/monad-metrics, fast-logger, wai-cli and others.@@ -16,9 +16,9 @@ bug-reports:    https://github.com/myfreeweb/magicbane/issues author:         Greg V maintainer:     greg@unrelenting.technology-copyright:      2017-2018 Greg V <greg@unrelenting.technology>+copyright:      2017-2020 Greg V <greg@unrelenting.technology> license:        PublicDomain-tested-with:    GHC==8.6.5+tested-with:    GHC==8.8.4 build-type:     Simple  source-repository head