packages feed

liblawless 0.19.1 → 0.19.2

raw patch · 6 files changed

+171/−12 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Boomerang: infix 9 ∘
- Boomerang: type TextsBoomerang a b = Boomerang TextsError [Text] a b
+ Boomerang: infixr 9 ∘
+ Boomerang: parseText :: forall r b. (IsText b) => StringBoomerang () (r :- ()) -> b -> Either TextError r
+ Boomerang: type TextBoomerang a b = Boomerang TextError Text a b
+ Boomerang: unparseText :: forall r b. (IsText b) => StringBoomerang () (r :- ()) -> r -> Maybe b
- IO: using :: Managed a -> m a
+ IO: using :: MonadManaged m => Managed a -> m a
- Time: buildTime :: TimeLocale -> [(Char, String)] -> Maybe t
+ Time: buildTime :: ParseTime t => TimeLocale -> [(Char, String)] -> Maybe t
- Time: formatCharacter :: Char -> Maybe (TimeLocale -> Maybe NumericPadOption -> t -> String)
+ Time: formatCharacter :: FormatTime t => Char -> Maybe (TimeLocale -> Maybe NumericPadOption -> t -> String)

Files

+ CODE_OF_CONDUCT.md view
@@ -0,0 +1,80 @@+# Contributor Covenant Code of Conduct++## Our Pledge++In the interest of fostering an open and welcoming environment, we as+contributors and maintainers pledge to making participation in our+project and our community a harassment-free experience for everyone,+regardless of age, body size, disability, ethnicity, gender identity+and expression, level of experience, nationality, personal appearance,+race, religion, or sexual identity and orientation.++## Our Standards++Examples of behavior that contributes to creating a positive+environment include:++* Using welcoming and inclusive language+* Being respectful of differing viewpoints and experiences+* Gracefully accepting constructive criticism+* Focusing on what is best for the community+* Showing empathy towards other community members++Examples of unacceptable behavior by participants include:++* The use of sexualized language or imagery and unwelcome sexual+attention or advances+* Trolling, insulting/derogatory comments, and personal or political+  attacks+* Public or private harassment+* Publishing others' private information, such as a physical or+  electronic address, without explicit permission+* Other conduct which could reasonably be considered inappropriate in+  a professional setting++## Our Responsibilities++Project maintainers are responsible for clarifying the standards of+acceptable behavior and are expected to take appropriate and fair+corrective action in response to any instances of unacceptable+behavior.++Project maintainers have the right and responsibility to remove, edit,+or reject comments, commits, code, wiki edits, issues, and other+contributions that are not aligned to this Code of Conduct, or to ban+temporarily or permanently any contributor for other behaviors that+they deem inappropriate, threatening, offensive, or harmful.++## Scope++This Code of Conduct applies both within project spaces and in public+spaces when an individual is representing the project or its+community. Examples of representing a project or community include+using an official project e-mail address, posting via an official+social media account, or acting as an appointed representative at an+online or offline event. Representation of a project may be further+defined and clarified by project maintainers.++## Enforcement++Instances of abusive, harassing, or otherwise unacceptable behavior+may be reported by contacting the [project team](evan@theunixman.com)+at <evan@theunixman.com>. All complaints will be reviewed and+investigated and will result in a response that is deemed necessary+and appropriate to the circumstances. The project team is obligated to+maintain confidentiality with regard to the reporter of an incident.+Further details of specific enforcement policies may be posted+separately.++Project maintainers who do not follow or enforce the Code of Conduct+in good faith may face temporary or permanent repercussions as+determined by other members of the project's leadership.++## Attribution++This Code of Conduct is adapted from+the [Contributor Covenant][homepage], version 1.4, available+at [http://contributor-covenant.org/version/1/4][version]++[homepage]: http://contributor-covenant.org+[version]: http://contributor-covenant.org/version/1/4/
Source/Boomerang.hs view
@@ -1,24 +1,32 @@-{-# LANGUAGE TemplateHaskell #-}-{-# Language TypeOperators, PolyKinds, MultiWayIf #-}- module Boomerang (     module Text.Boomerang,     module Text.Boomerang.TH,-    module Text.Boomerang.Texts,+    module Text.Boomerang.String,     module Control.Category,-    TextsBoomerang,+    module Text,+    TextBoomerang,+    parseText,+    unparseText,     (∘)     ) where -import Text (Text)+import Lawless hiding ((.), (∘), (<>))+import Text (Text, packed, unpacked, IsText) import Text.Boomerang import Text.Boomerang.TH-import Text.Boomerang.Texts+import Text.Boomerang.String import Control.Category ((.), id, Category) -type TextsBoomerang a b = Boomerang TextsError [Text] a b+type TextError = StringError+type TextBoomerang a b = Boomerang TextError Text a b  (∘) ∷ ∀ (b ∷ k) (c ∷ k) (a ∷ k) (cat ∷ k → k → *).     Category cat ⇒ cat b c → cat a b → cat a c (∘) = (.)-infix 9 ∘+infixr 9 ∘++parseText ∷ ∀ r b. (IsText b) ⇒ StringBoomerang () (r :- ()) → b → Either TextError r+parseText p t = parseString p (t ^. unpacked)++unparseText ∷ ∀ r b. (IsText b) ⇒ StringBoomerang () (r :- ()) → r → Maybe b+unparseText p r = view packed <$> unparseString p r
Tests/Main.hs view
@@ -15,4 +15,5 @@     TJ.properties,     TM.properties,     TE.properties,-    TX.properties]+    TX.properties+    ]
+ Tests/PipeDelimited.hs view
@@ -0,0 +1,34 @@+{-|+Module:             PipeDelimited+Description:        Data type for testing Boomerangs.+Copyright:          © 2017 All rights reserved.+License:            GPL-3+Maintainer:         Evan Cofsky <evan@theunixman.com>+Stability:          experimental+Portability:        POSIX+-}++{-# Language TemplateHaskell #-}++module PipeDelimited where++import Lawless hiding ((∘), (<>))+import Arbitrary+import Boomerang+import Test.QuickCheck++newtype PipeDelimited = PipeDelimited [Text] deriving (Eq, Show, Ord)+makePrisms ''PipeDelimited+makeBoomerangs ''PipeDelimited++-- pipeDelimited =+--     (+--         rPipeDelimited ∘ chainr (satisfy (≢ '|')) "|"+--     )++-- instance Arbitrary PipeDelimited where+--     arbitrary =+--         let+--             w = (suchThat arbitrary $ allOf each (≢ '|'))+--         in+--             PipeDelimited <$> listOf w
+ Tests/TestBoomerang.hs view
@@ -0,0 +1,33 @@+{-# LANGUAGE TemplateHaskell #-}+{-# OPTIONS_GHC -Wno-orphans #-}++{-|+Module:             TestBoomerang+Description:        Test the Boomerang module of liblawless.+Copyright:          © 2017 All rights reserved.+License:            GPL-3+Maintainer:         Evan Cofsky <evan@theunixman.com>+Stability:          experimental+Portability:        POSIX+-}++module TestBoomerang where++import Lawless+import Arbitrary++import Test.Framework+import Test.Framework.TH+import Test.Framework.Providers.QuickCheck2 (testProperty)+import Test.QuickCheck++data PipeDelimited = PipeDelimited [Text] deriving (Eq, Show, Ord)+instance Arbitrary PipeDelimited where+    arbitrary =+        let+            w = (suchThat arbitrary $ allOf each (≢ '|'))+        in+            PipeDelimited <$> listOf1 w++properties ∷ Test+properties = $(testGroupGenerator)
liblawless.cabal view
@@ -1,5 +1,5 @@ name:                liblawless-version:             0.19.1+version:             0.19.2 synopsis:            Prelude based on protolude for GHC 8 and beyond. license:             GPL-3 license-file:        LICENSE@@ -12,6 +12,7 @@                    ChangeLog                    README.md                    TODO.org+                   CODE_OF_CONDUCT.md                    Tests/*.hs cabal-version:       >=1.24 data-files:@@ -27,7 +28,7 @@ source-repository this   type:     git   location:   git@gitlab.com:misandrist/liblawless.git-  tag: v0.19.1+  tag: v0.19.2  library   ghc-options: -Wall -Wno-redundant-constraints -O2@@ -70,10 +71,12 @@                      MultiParamTypeClasses                      OverloadedStrings                      PartialTypeSignatures+                     PolyKinds                      RankNTypes                      ScopedTypeVariables                      StandaloneDeriving                      TypeFamilies+                     TypeOperators                      TypeSynonymInstances   build-depends:                 aeson                      >= 0.11.2 && < 0.12,