gtk2hs-buildtools 0.13.0.1 → 0.13.0.2
raw patch · 4 files changed
+29/−2 lines, 4 filesdep ~base
Dependency ranges changed: base
Files
- c2hs/base/state/StateBase.hs +10/−0
- c2hs/base/state/StateTrans.hs +9/−1
- c2hs/c/CParserMonad.hs +9/−0
- gtk2hs-buildtools.cabal +1/−1
c2hs/base/state/StateBase.hs view
@@ -56,6 +56,9 @@ unpackCST, readCST, writeCST, transCST, liftIO) where +import Control.Applicative (Applicative(..))+import Control.Monad (liftM, ap)+ import Position (Position) import UNames (NameSupply) import StateTrans (STB, @@ -94,6 +97,13 @@ -- newtype PreCST e s a = CST (STB (BaseState e) s a)++instance Functor (PreCST e s) where+ fmap = liftM++instance Applicative (PreCST e s) where+ pure = return+ (<*>) = ap instance Monad (PreCST e s) where return = yield
c2hs/base/state/StateTrans.hs view
@@ -81,7 +81,8 @@ import Prelude hiding (catch) -import Control.Monad (liftM)+import Control.Applicative (Applicative(..))+import Control.Monad (liftM, ap) import Control.Exception (catch) import System.IO (fixIO) import Data.IORef (IORef, newIORef, readIORef, writeIORef)@@ -114,6 +115,13 @@ -- newtype STB bs gs a = STB (bs -> gs -> IO (bs, gs, Either (String, String) a))++instance Functor (STB bs gs) where+ fmap = liftM++instance Applicative (STB bs gs) where+ pure = return+ (<*>) = ap instance Monad (STB bs gs) where return = yield
c2hs/c/CParserMonad.hs view
@@ -61,6 +61,8 @@ import UNames (Name) import Idents (Ident, lexemeToIdent, identToLexeme) +import Control.Applicative (Applicative(..))+import Control.Monad (liftM, ap) import Data.Set (Set) import qualified Data.Set as Set (fromList, insert, member, delete) @@ -80,6 +82,13 @@ } newtype P a = P { unP :: PState -> ParseResult a }++instance Functor P where+ fmap = liftM++instance Applicative P where+ pure = return+ (<*>) = ap instance Monad P where return = returnP
gtk2hs-buildtools.cabal view
@@ -1,5 +1,5 @@ Name: gtk2hs-buildtools-Version: 0.13.0.1+Version: 0.13.0.2 License: GPL-2 License-file: COPYING Copyright: (c) 2001-2010 The Gtk2Hs Team