packages feed

unbeliever 0.10.0.1 → 0.10.0.5

raw patch · 8 files changed

+139/−82 lines, 8 filesdep +asyncdep +chronologiquedep +containersdep ~core-datadep ~core-programdep ~core-textPVP ok

version bump matches the API change (PVP)

Dependencies added: async, chronologique, containers, deepseq, directory, exceptions, filepath, fsnotify, hashable, hourglass, megaparsec, mtl, prettyprinter, prettyprinter-ansi-terminal, scientific, stm, template-haskell, terminal-size, transformers, unix, unordered-containers

Dependency ranges changed: core-data, core-program, core-text

API changes (from Hackage documentation)

Files

− LICENCE
@@ -1,32 +0,0 @@-Opinionated Haskell Interoperability--Copyright © 2018-2019 Operational Dynamics Consulting, Pty Ltd and Others-All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions-are met:--    1. Redistributions of source code must retain the above copyright-       notice, this list of conditions and the following disclaimer.--    2. Redistributions in binary form must reproduce the above-       copyright notice, this list of conditions and the following-       disclaimer in the documentation and/or other materials provided-       with the distribution.-      -    3. Neither the name of the project nor the names of its contributors-       may be used to endorse or promote products derived from this -       software without specific prior written permission.--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ LICENSE view
@@ -0,0 +1,32 @@+Opinionated Haskell Interoperability++Copyright © 2018-2019 Operational Dynamics Consulting, Pty Ltd and Others+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:++    1. Redistributions of source code must retain the above copyright+       notice, this list of conditions and the following disclaimer.++    2. Redistributions in binary form must reproduce the above+       copyright notice, this list of conditions and the following+       disclaimer in the documentation and/or other materials provided+       with the distribution.+      +    3. Neither the name of the project nor the names of its contributors+       may be used to endorse or promote products derived from this +       software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
− core-program/lib/Core/Everything.hs
@@ -1,26 +0,0 @@-{-# OPTIONS_HADDOCK not-home, hide #-}--{-|-Meta package re-exporting all the modules in the collection, which is only-here so the top level __unbeliever__ package shows dependencies on-__core-text__, __core-data__, and __core-program__.--}------ This module is not exposed. Should it be? At first seems like a nice--- idea, but caused more problems than anything; you try to actually use--- e.g. Rope and you get a "hidden package core-text" errors.----module Core.Everything-    (-        module Core.Text-      , module Core.Program-      , module Core.Data-      , module Core.Encoding-      , module Core.System-    ) where--import Core.Text-import Core.Data-import Core.Program-import Core.System-import Core.Encoding
tests/CheckBytesBehaviour.hs view
@@ -7,7 +7,7 @@ import qualified Data.ByteString.Char8 as C import Test.Hspec -import Core.Text.Bytes+import Core.Text.Bytes () import Core.Text.Utilities (byteChunk)  checkBytesBehaviour :: Spec
tests/CheckRopeBehaviour.hs view
@@ -2,10 +2,15 @@ {-# LANGUAGE QuasiQuotes #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} -module CheckRopeBehaviour where+module CheckRopeBehaviour+    ( checkRopeBehaviour+    , main+    )+where  import Data.Char (isSpace) import qualified Data.FingerTree as F+import Data.Hashable (hash) import qualified Data.List as List import qualified Data.Text as T import qualified Data.Text.Encoding as T@@ -15,7 +20,12 @@  import Core.Text.Rope import Core.Text.Utilities+import Core.System (finally) +main :: IO ()+main = do+    finally (hspec checkRopeBehaviour) (putStrLn ".")+ hydrogen = "H₂" :: Rope sulfate = "SO₄" :: Rope @@ -25,8 +35,10 @@  checkRopeBehaviour :: Spec checkRopeBehaviour = do-    describe "Rope data type" $-      do+    describe "Rope data type" $ do+        it "knows what a singleton is" $ do+            singletonRope 'i' `shouldBe` "i"+         it "IsString instance behaves" $ do             unRope ("Hello" :: Rope) `shouldBe` F.singleton (S.pack "Hello") @@ -43,6 +55,9 @@              ("H₂" :: Rope) == ("H₂" :: Rope) `shouldBe` True              ("H₂" :: Rope) /= ("SO₄" :: Rope)  `shouldBe` True +        it "Hashable instance behaves" $ do+             hash ("Hello" :: Rope) `shouldBe` hash (singletonRope 'H' <> intoRope ("ello" :: String))+         -- depended on Textual instance for String being fixed and         -- the Eq instance being customized to ignore tree structure         it "concatonates two Ropes correctly (Monoid)" $ do@@ -51,6 +66,14 @@         it "concatonates two Ropes correctly (Textual)" $ do              appendRope ("SO₄" :: Rope) ("H₂" :: Rope) `shouldBe` ("H₂SO₄" :: Rope) +        it "replicates itself" $ do+            replicateRope 3 "hello" `shouldBe` ("hellohellohello" :: Rope)+            length (unRope (replicateRope 3 "hello")) `shouldBe` 3+            replicateRope 3 "" `shouldBe` emptyRope+            replicateRope 0 "hello" `shouldBe` emptyRope+            replicateChar 3 'x' `shouldBe` ("xxx" :: Rope)+            replicateChar 0 'x' `shouldBe` ("" :: Rope)+         it "exports to ByteString" $           let             expected = T.encodeUtf8 (T.pack "H₂SO₄")@@ -96,8 +119,13 @@             insertRope 0 "one" "twothree" `shouldBe` "onetwothree"             insertRope 6 "three" "onetwo" `shouldBe` "onetwothree" -    describe "QuasiQuoted string literals" $-      do+        it "finds characters correctly" $ do+            findIndexRope (== '3') compound `shouldBe` (Just 0)+            findIndexRope (== '4') compound `shouldBe` (Just 8)+            findIndexRope (== '!') compound `shouldBe` Nothing+            findIndexRope (== 'e') compound `shouldBe` (Just 2)++    describe "QuasiQuoted string literals" $ do         it "string literal is IsString" $ do             [quote|Hello|] `shouldBe` ("Hello" :: String)             [quote|Hello|] `shouldBe` ("Hello" :: Rope)@@ -217,3 +245,11 @@ Hello this is a test of the Emergency Broadcast System|]++    describe "Lines and columns" $ do+        it "calculate position of a given block" $ do+            calculatePositionEnd "" `shouldBe` (1,1)+            calculatePositionEnd "Hello" `shouldBe` (1,6)+            calculatePositionEnd "Hello\nWorld" `shouldBe` (2,6)+            calculatePositionEnd "\nWorld" `shouldBe` (2,6)+            calculatePositionEnd "\n" `shouldBe` (2,1)
+ tests/Everything.hs view
@@ -0,0 +1,26 @@+{-# OPTIONS_HADDOCK not-home, hide #-}++{-|+Meta package re-exporting all the modules in the collection, which is only+here so the top level __unbeliever__ package shows dependencies on+__core-text__, __core-data__, and __core-program__.+-}+--+-- This module is not exposed. Should it be? At first seems like a nice+-- idea, but caused more problems than anything; you try to actually use+-- e.g. Rope and you get a "hidden package core-text" errors.+--+module Everything+    (+        module Core.Text+      , module Core.Program+      , module Core.Data+      , module Core.Encoding+      , module Core.System+    ) where++import Core.Text+import Core.Data+import Core.Program+import Core.System+import Core.Encoding
tests/TestSuite.hs view
@@ -3,7 +3,7 @@ import Test.Hspec  import Core.System-import CheckRopeBehaviour+import CheckRopeBehaviour (checkRopeBehaviour) import CheckBytesBehaviour import CheckContainerBehaviour import CheckJsonWrapper
unbeliever.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.1.+-- This file has been generated from package.yaml by hpack version 0.31.2. -- -- see: https://github.com/sol/hpack ----- hash: 6489b8ffb937697cdd90b22aee666d473cb87db11ec7470fe21f9a1b8ed26689+-- hash: 98e877f90bde84cfecc972b36c9d063baac619850900284973e14923a423f49f  name:           unbeliever-version:        0.10.0.1+version:        0.10.0.5 synopsis:       Opinionated Haskell Interoperability description:    A library to help build command-line programs, both tools and                 longer-running daemons. Its @Program@ type provides unified ouptut &@@ -44,9 +44,9 @@ bug-reports:    https://github.com/oprdyn/unbeliever/issues author:         Andrew Cowie <andrew@operationaldynamics.com> maintainer:     Andrew Cowie <andrew@operationaldynamics.com>-copyright:      © 2018-2019 Operational Dynamics Consulting Pty Ltd, and Others+copyright:      © 2018-2020 Operational Dynamics Consulting Pty Ltd, and Others license:        BSD3-license-file:   LICENCE+license-file:   LICENSE tested-with:    GHC == 8.6.5 build-type:     Simple @@ -56,15 +56,15 @@  library   other-modules:-      Core.Everything+      Everything   hs-source-dirs:-      core-program/lib+      tests   ghc-options: -Wall -Wwarn -fwarn-tabs   build-depends:       base >=4.11 && <5-    , core-data >=0.2.0.0-    , core-program >=0.2.0.0-    , core-text >=0.2.0.0+    , core-data >=0.2.1.5+    , core-program >=0.2.4.1+    , core-text >=0.2.3.1   default-language: Haskell2010  test-suite check@@ -81,16 +81,37 @@       tests   ghc-options: -Wall -Wwarn -fwarn-tabs -threaded   build-depends:-      base >=4.11 && <5+      async+    , base >=4.11 && <5     , bytestring-    , core-data >=0.2.0.0-    , core-program >=0.2.0.0-    , core-text >=0.2.0.0+    , chronologique+    , containers+    , core-data >=0.2.1.5+    , core-program >=0.2.4.1+    , core-text >=0.2.3.1+    , deepseq+    , directory+    , exceptions+    , filepath     , fingertree+    , fsnotify+    , hashable+    , hourglass     , hspec+    , megaparsec+    , mtl+    , prettyprinter+    , prettyprinter-ansi-terminal     , safe-exceptions+    , scientific+    , stm+    , template-haskell+    , terminal-size     , text     , text-short+    , transformers+    , unix+    , unordered-containers   default-language: Haskell2010  benchmark performance@@ -102,9 +123,9 @@   build-depends:       base >=4.11 && <5     , bytestring-    , core-data >=0.2.0.0-    , core-program >=0.2.0.0-    , core-text >=0.2.0.0+    , core-data >=0.2.1.5+    , core-program >=0.2.4.1+    , core-text >=0.2.3.1     , gauge     , text   default-language: Haskell2010