packages feed

acme-dont 1.1 → 1.2

raw patch · 9 files changed

+146/−71 lines, 9 filesdep +acme-dontdep +tastydep +tasty-hunitdep ~basesetup-changednew-uploaderPVP ok

version bump matches the API change (PVP)

Dependencies added: acme-dont, tasty, tasty-hunit

Dependency ranges changed: base

API changes (from Hackage documentation)

- Acme.Dont: don't :: Monad m => m a -> m ()
+ Acme.Dont: don't :: Applicative f => f a -> f ()

Files

− Acme/Dont.hs
@@ -1,31 +0,0 @@--- |
--- Module      : Acme.Dont
--- Copyright   : Gracjan Polak 2009
--- License     : BSD-style
--- Maintainer  : Gracjan Polak <gracjanpolak@gmail.com>
--- Stability   : experimental
--- Portability : portable
---
--- The Acme.Dont module provides the indispensable don't command,
--- ported from Perl.
---
--- For more information see influential documentation:
--- <http://search.cpan.org/~dconway/Acme-Don-t-1.01/t.pm>
---
--- Usage:
---
--- > main = don't $ do
--- >     name <- getLine
--- >     putStrLn $ "hello " ++ name
---
-module Acme.Dont where
-
--- | The Acme.Dont module provides a don't command, which is the
--- opposite of Haskell's built-in do.  It is used exactly like the do
--- monadic construct except that, instead of executing the block it
--- controls, it... well... doesn't.
---
--- Regardless of the contents of the block, don't returns ().
---
-don't :: (Monad m) => m a -> m ()
-don't _action = return ()
+ CHANGELOG.md view
@@ -0,0 +1,14 @@+# Revision history for semialign-extras++## 1.2 -- 2020-04-01++* Generalise `Acme.Dont.don't` from `Monad` to `Applicative`.+* Switch from "BSD-like" license to BSD 3-clause license.++## 1.1 -- 2009-11-09++* Switch from Lua license to "BSD-like" license.++## 1.0 -- 2009-11-09++* First version. Released on an unsuspecting world.
@@ -1,20 +0,0 @@-Copyright (C) 2009 Gracjan Polak--Permission is hereby granted, free of charge, to any person obtaining a copy-of this software and associated documentation files (the "Software"), to deal-in the Software without restriction, including without limitation the rights-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell-copies of the Software, and to permit persons to whom the Software is-furnished to do so, subject to the following conditions:--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN-THE SOFTWARE.--===============================================================================--(end of COPYRIGHT)
+ LICENSE view
@@ -0,0 +1,28 @@+Copyright (c) 2009 Gracjan Polak++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 copyright holder 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+HOLDER 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.
+ README.md view
@@ -0,0 +1,17 @@+# acme-dont++[![builds.sr.ht status](https://builds.sr.ht/~jack/acme-dont.svg)](https://builds.sr.ht/~jack/acme-dont?)++The `Acme.Dont` module provides a `don't` command, which is the+opposite of Haskell's built-in `do`.  It is used exactly like the `do`+monadic construct except that, instead of executing the block it+controls, it... well... doesn't.++## Other Resources++* Questions should go to the+  [acme-dont-discuss](https://lists.sr.ht/~jack/acme-dont-discuss)+  mailing list.++* Bug reports should go to the+  [bug tracker](https://todo.sr.ht/~jack/acme-dont).
Setup.hs view
@@ -1,2 +1,2 @@-import Distribution.Simple
+import Distribution.Simple main = defaultMain
acme-dont.cabal view
@@ -1,19 +1,47 @@-Name: acme-dont-Version: 1.1-Stability: stable-Exposed-modules: Acme.Dont-Build-type: Simple-License: BSD3-License-File: COPYRIGHT-Copyright: 2009, Gracjan Polak-Author: Gracjan Polak <gracjanpolak@gmail.com>-Maintainer: Gracjan Polak <gracjanpolak@gmail.com>-Synopsis: A don't construct-Description:-    The Acme.Dont module provides a don't command, which is the-    opposite of Haskell's built-in do.  It is used exactly like the do-    monadic construct except that, instead of executing the block it-    controls, it... well... doesn't.-Category: Acme-Build-depends: base<1000000-Hs-source-dirs: .+cabal-version: >= 1.10++name:          acme-dont+version:       1.2+synopsis:      A "don't" construct+description:   The Acme.Dont module provides a @don't@ command, which+               is the opposite of Haskell's built-in @do@.  It is used exactly+               like the @do@ monadic construct except that, instead of executing+               the block it controls, it... well... doesn't.+stability:     stable+homepage:      https://git.sr.ht/~jack/acme-dont+bug-reports:   https://todo.sr.ht/~jack/acme-dont+license:       BSD3+license-file:  LICENSE+author:        Gracjan Polak <gracjanpolak@gmail.com>+maintainer:    jack@jackkelly.name+copyright:     (c) 2009 Gracjan Polak+category:      Acme+build-type:    Simple+extra-source-files:  CHANGELOG.md README.md+tested-with:   GHC == 8.4.4+                || == 8.6.5+                || == 8.8.3+                || == 8.10.1++library+  ghc-options:      -Wall+  exposed-modules:  Acme.Dont+  build-depends:    base >= 4.8 && < 5+  hs-source-dirs:   src+  default-language: Haskell2010++test-suite acme-dont-tests+  type:                exitcode-stdio-1.0+  main-is:             Main.hs+  ghc-options:         -Wall -threaded+  build-depends:       base >= 4.8 && < 5+                     , acme-dont+                     , tasty >= 1.2.3 && < 1.3+                     , tasty-hunit >= 0.10.0.2 && < 0.11+  hs-source-dirs:      test+  default-language:    Haskell2010+++source-repository head+  type:     git+  location: https://git.sr.ht/~jack/acme-dont
+ src/Acme/Dont.hs view
@@ -0,0 +1,25 @@+-- |+-- Module      : Acme.Dont+-- Copyright   : Gracjan Polak 2009+-- License     : BSD3+-- Maintainer  : Jack Kelly <jack@jackkelly.name>+-- Stability   : stable+-- Portability : portable+--+-- Provides the indispensable don't command, ported from Perl. It is+-- used exactly like the do monadic construct except that, instead of+-- executing the block it controls, it... well... doesn't.+--+-- * For more information see influential documentation:+-- <http://search.cpan.org/~dconway/Acme-Don-t-1.01/t.pm>+--+-- Usage:+--+-- > main = don't $ do+-- >     name <- getLine+-- >     putStrLn $ "hello " ++ name+module Acme.Dont (don't) where++-- | Do not execute the argument.+don't :: Applicative f => f a -> f ()+don't _ = pure ()
+ test/Main.hs view
@@ -0,0 +1,14 @@+module Main where++import Acme.Dont (don't)+import Test.Tasty (TestTree, defaultMain, testGroup)+import Test.Tasty.HUnit ((@?=), testCase)++main :: IO ()+main = defaultMain tests++tests :: TestTree+tests = testGroup "don't"+  [ testCase "don't run an error" $+    don't (error "should not see this") @?= Just ()+  ]