diff options
Diffstat (limited to 'src/compiler/GF/Data/Operations.hs')
| -rw-r--r-- | src/compiler/GF/Data/Operations.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/GF/Data/Operations.hs b/src/compiler/GF/Data/Operations.hs index cd42156d4..ef34de27b 100644 --- a/src/compiler/GF/Data/Operations.hs +++ b/src/compiler/GF/Data/Operations.hs @@ -67,7 +67,8 @@ import Data.Char (isSpace, toUpper, isSpace, isDigit) import Data.List (nub, partition, (\\)) import qualified Data.Map as Map import Data.Map (Map) -import Control.Monad (liftM,liftM2) +import Control.Applicative(Applicative(..)) +import Control.Monad (liftM,liftM2,ap) import GF.Data.ErrM import GF.Data.Relation @@ -330,6 +331,10 @@ stmr f = stm (\s -> return (f s)) instance Functor (STM s) where fmap = liftM +instance Applicative (STM s) where + pure = return + (<*>) = ap + instance Monad (STM s) where return a = STM (\s -> return (a,s)) STM c >>= f = STM (\s -> do |
