packages feed

UtilityTM (empty) → 0.0.1

raw patch · 4 files changed

+87/−0 lines, 4 filesdep +basesetup-changed

Dependencies added: base

Files

+ LICENSE view
@@ -0,0 +1,27 @@+Copyright 2011 Tony Morris++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 author nor the names of his contributors+   may be used to endorse or promote products derived from this software+   without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 AUTHORS 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.
+ Setup.hs view
@@ -0,0 +1,3 @@+import Distribution.Simple+main = defaultMain+
+ UtilityTM.cabal view
@@ -0,0 +1,29 @@+Name:               UtilityTM+Version:            0.0.1+License:            BSD3+License-File:       LICENSE+Author:             Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>+Maintainer:         Tony Morris+Synopsis:           Utility functions that are missing from the standard library+Category:           Development+Description:        Utility functions that are missing from the standard library+Homepage:           https://bitbucket.org/dibblego/utility-tm/+Cabal-version:      >= 1.2+Build-Type:         Simple++Flag small_base+  Description:      Choose the new, split-up base package.++Library+  Build-Depends:+                    base < 5 && >= 3++  GHC-Options:+                    -Wall++  Hs-Source-Dirs:+                    src++  Exposed-Modules:+                      Control.Monad.TM+
+ src/Control/Monad/TM.hs view
@@ -0,0 +1,28 @@+-- | Monadic combinators missing from the standard library+module Control.Monad.TM+(+  (.>>=.)+, (.=<<.)+) where++import Data.Traversable+import Control.Monad hiding (mapM)+import Prelude hiding (mapM)++-- | Lifting bind into a monad. Often denoted /concatMapM/.+(.>>=.) ::+  (Monad q, Monad m, Traversable m) =>+  (a -> q (m b))+  -> m a+  -> q (m b)+(.>>=.) f =+  liftM join . mapM f++-- | Lifting bind into a monad. Often denoted /concatMapM/.+(.=<<.) ::+  (Monad q, Monad m, Traversable m) =>+  m a+  -> (a -> q (m b))+  -> q (m b)+(.=<<.) =+  flip (.>>=.)