regions-monadsfd (empty) → 0.1
raw patch · 4 files changed
+120/−0 lines, 4 filesdep +monads-fddep +regionsdep +transformerssetup-changed
Dependencies added: monads-fd, regions, transformers, unicode-symbols
Files
- Control/Monad/Trans/Region/Instances/MonadsFD.hs +62/−0
- LICENSE +31/−0
- Setup.hs +3/−0
- regions-monadsfd.cabal +24/−0
+ Control/Monad/Trans/Region/Instances/MonadsFD.hs view
@@ -0,0 +1,62 @@+{-# LANGUAGE UnicodeSyntax #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}++-------------------------------------------------------------------------------+-- |+-- Module : Control.Monad.Trans.Region.Instances.MonadsFD+-- Copyright : (c) 2009 Bas van Dijk+-- License : BSD3 (see the file LICENSE)+-- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com>+--+-- This module provides instances for the monads-fd classes for 'RegionT's.+--+--------------------------------------------------------------------------------++module Control.Monad.Trans.Region.Instances.MonadsFD where++-- from monads-fd:+-- TODO: import Control.Monad.Cont.Class ( MonadCont, callCC )+import Control.Monad.Error.Class ( MonadError, throwError, catchError )+import Control.Monad.RWS.Class ( MonadRWS )+import Control.Monad.Reader.Class ( MonadReader, ask, local )+import Control.Monad.State.Class ( MonadState, get, put )+import Control.Monad.Writer.Class ( MonadWriter, tell, listen, pass )++-- from transformers:+import Control.Monad.Trans ( lift )++-- from unicode-symbols:+import Prelude.Unicode ( (∘) )++-- from regions:+import Control.Monad.Trans.Region.Internal ( RegionT+ , liftCatch+ , mapRegionT+ -- TODO: , liftCallCC+ )++-- TODO:+-- instance Monad pr ⇒ MonadCont (RegionT resource s pr) where+-- callCC = liftCallCC callCC++instance MonadError e pr ⇒ MonadError e (RegionT resource s pr) where+ throwError = lift ∘ throwError+ catchError = liftCatch catchError++instance MonadRWS r w st pr ⇒ MonadRWS r w st (RegionT resource s pr)++instance MonadReader r pr ⇒ MonadReader r (RegionT resource s pr) where+ ask = lift ask+ local = mapRegionT ∘ local++instance MonadWriter w pr ⇒ MonadWriter w (RegionT resource s pr) where+ tell = lift ∘ tell+ listen = mapRegionT listen+ pass = mapRegionT pass++instance MonadState st pr ⇒ MonadState st (RegionT resource s pr) where+ get = lift get+ put = lift ∘ put
+ LICENSE view
@@ -0,0 +1,31 @@+Copyright (c) 2009 Bas van Dijk++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.++ * The name of Bas van Dijk and the names of contributors may NOT+ 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,3 @@+import Distribution.Simple++main = defaultMain
+ regions-monadsfd.cabal view
@@ -0,0 +1,24 @@+name: regions-monadsfd+version: 0.1+cabal-version: >=1.6+build-type: Simple+license: BSD3+license-file: LICENSE+copyright: 2009 Bas van Dijk+author: Bas van Dijk+maintainer: Bas van Dijk <v.dijk.bas@gmail.com>+stability: experimental+category: Control+synopsis: Monads-fd instances for the RegionT monad transformer++source-repository head+ Type: darcs+ Location: http://code.haskell.org/~basvandijk/code/regions-monadsfd++Library+ GHC-Options: -O2 -Wall -fno-warn-orphans+ build-depends: unicode-symbols == 0.1.*+ , transformers >= 0.1.4 && < 0.2+ , regions == 0.1.*+ , monads-fd == 0.0.*+ exposed-modules: Control.Monad.Trans.Region.Instances.MonadsFD