packages feed

writer-cps-mtl (empty) → 0.1.0.0

raw patch · 5 files changed

+149/−0 lines, 5 filesdep +basedep +mtldep +transformerssetup-changed

Dependencies added: base, mtl, transformers, writer-cps-transformers

Files

+ Control/Monad/RWS/CPS.hs view
@@ -0,0 +1,50 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+module Control.Monad.RWS.CPS (+  -- * The RWS monad+  RWS,+  rws,+  runRWS,+  evalRWS,+  execRWS,+  mapRWS,+  withRWS,+  -- * The RWST monad transformer+  RWST,+  runRWST,+  evalRWST,+  execRWST,+  mapRWST,+  withRWST,+  -- * Strict Reader-writer-state monads+  module X+) where++import Control.Monad as X+import Control.Monad.Fix as X+import Control.Monad.RWS.Class as X+import Control.Monad.Trans as X+import Data.Monoid as X++import Control.Monad.Trans.RWS.CPS hiding (censor, tell, writer, listen, pass, ask,+                                           local, reader, get, put, state, listens,+                                           asks, modify, gets)+import qualified Control.Monad.Trans.RWS.CPS as CPS++-- Orphan instance+instance (Monoid w, Monad m) => MonadWriter w (RWST r w s m) where+  tell = CPS.tell+  writer = CPS.writer+  listen = CPS.listen+  pass = CPS.pass++-- Orphan instance+instance Monad m => MonadReader r (RWST r w s m) where+  ask = CPS.ask+  local = CPS.local+  reader = CPS.reader++-- Orphan instance+instance Monad m => MonadState s (RWST r w s m) where+  get = CPS.get+  put = CPS.put+  state = CPS.state
+ Control/Monad/Writer/CPS.hs view
@@ -0,0 +1,29 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+module Control.Monad.Writer.CPS (+  -- * The Writer monad+  Writer,+  runWriter,+  execWriter,+  mapWriter,+  -- * The WriterT monad transformer+  WriterT,+  runWriterT,+  execWriterT,+  mapWriterT,+  module X+) where++import Control.Monad as X+import Control.Monad.Fix as X+import Control.Monad.Trans as X+import Control.Monad.Writer.Class as X+import Data.Monoid as X++import Control.Monad.Trans.Writer.CPS hiding (writer, listen, pass)+import qualified Control.Monad.Trans.Writer.CPS as CPS++-- Orphan instance+instance (Monoid w, Monad m) => MonadWriter w (CPS.WriterT w m) where+  writer = CPS.writer+  listen = CPS.listen+  pass = CPS.pass
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2016 Daniel Mendler, original work by Andy Gill and Edward Kmett++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.++    * Neither the name of the copyright holders nor the names of other+      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.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ writer-cps-mtl.cabal view
@@ -0,0 +1,38 @@+-- This file has been generated from package.yaml by hpack version 0.14.1.+--+-- see: https://github.com/sol/hpack++name:           writer-cps-mtl+version:        0.1.0.0+cabal-version:  >= 1.10+license:        MIT+license-file:   LICENSE+tested-with:    GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1+author:         Andy Gill, Edward Kmett, Daniel Mendler+maintainer:     mail@daniel-mendler.de+copyright:      2016 Daniel Mendler+category:       Control+synopsis:       MonadWriter orphan instances for writer-cps-transformers+homepage:       https://github.com/minad/writer-cps-mtl#readme+bug-reports:    https://github.com/minad/writer-cps-mtl/issues+description:    The WriterT and RWST monad transformers provided by writer-cps-transformers are written in continuation passing style and avoid the space-leak problem of the traditional Control.Monad.Trans.Writer.Strict/Lazy.+build-type:     Simple++source-repository head+  type: git+  location: https://github.com/minad/writer-cps-mtl++library+  hs-source-dirs:+      .+  default-extensions: MultiParamTypeClasses FunctionalDependencies FlexibleInstances+  ghc-options: -Wall+  build-depends:+      base < 6+    , transformers >= 0.4 && < 0.6+    , mtl >= 2.2 && < 2.4+    , writer-cps-transformers == 0.1.0.0+  exposed-modules:+      Control.Monad.RWS.CPS+      Control.Monad.Writer.CPS+  default-language: Haskell2010