packages feed

AbortT-mtl (empty) → 1.0

raw patch · 4 files changed

+88/−0 lines, 4 filesdep +AbortT-transformersdep +basedep +mtlsetup-changed

Dependencies added: AbortT-transformers, base, mtl

Files

+ AbortT-mtl.cabal view
@@ -0,0 +1,28 @@+Name:                AbortT-mtl+Version:             1.0+License:             BSD3+License-file:        LICENSE+Author:              Gregory Crosswhite+Maintainer:          Gregory Crosswhite <gcrosswhite@gmail.com>+Stability:           Provisional+Homepage:            http://github.com/gcross/AbortT-mtl+Synopsis:            mtl instances for the AbortT monad transformer+Description:         This module provides instances for the mtl classes for AbortT.+Cabal-version:       >=1.6+Build-type:          Simple+Category:            Control++Library+    Build-depends:   base >= 3 && < 5,+                     AbortT-transformers >= 1.0.1 && < 1.1,+                     mtl == 2.1.*+    Exposed-modules: Control.Monad.Trans.Abort.Instances.MTL++source-repository head+  type:                git+  location:            git://github.com/gcross/AbortT-mtl.git++source-repository this+  type:                git+  location:            git://github.com/gcross/AbortT-mtl.git+  tag:                 1.0
+ Control/Monad/Trans/Abort/Instances/MTL.hs view
@@ -0,0 +1,36 @@+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE FunctionalDependencies #-}+{-# LANGUAGE UndecidableInstances #-}++module Control.Monad.Trans.Abort.Instances.MTL where++import Control.Monad.Cont.Class (MonadCont(..))+import Control.Monad.Error.Class (MonadError(..))+import Control.Monad.RWS.Class (MonadRWS(..))+import Control.Monad.Reader.Class (MonadReader(..))+import Control.Monad.Trans (lift)+import Control.Monad.Trans.Abort+import Control.Monad.State.Class (MonadState(..))+import Control.Monad.Writer.Class (MonadWriter(..))++instance MonadCont m => MonadCont (AbortT a m) where+    callCC = liftCallCC callCC++instance MonadError e m => MonadError e (AbortT a m) where+    throwError = lift . throwError+    catchError = liftCatch catchError++instance MonadReader r m => MonadReader r (AbortT a m) where+    ask   = lift ask+    local f = AbortT . local f . unwrapAbortT++instance MonadWriter w m => MonadWriter w (AbortT a m) where+    tell   = lift . tell+    listen = liftListen listen+    pass   = liftPass pass++instance MonadState s m => MonadState s (AbortT a m) where+    get = lift get+    put = lift . put++instance MonadRWS r w s m => MonadRWS r w s (AbortT a m)
+ LICENSE view
@@ -0,0 +1,22 @@+Copyright (c) 2012, Gregory Crosswhite+All rights reserved.++Redistribution and use in source and binary forms, with or without modification,+are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright notice,+      this list of conditions and the following disclaimer.+    * 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.++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.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain