]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Interaction.hs
Many changes...
[Lucu.git] / Network / HTTP / Lucu / Interaction.hs
index 46e32a139a37d17b88b0dce43e05540dc0cbd79f..8a64dc1b0715a1b3e703de12ed9c7da43c0076e6 100644 (file)
@@ -10,14 +10,14 @@ module Network.HTTP.Lucu.Interaction
     , newInteractionQueue
     , newInteraction
     , defaultPageContentType
-
+{-
     , writeItr
     , readItr
     , updateItr
+-}
     )
     where
 import Blaze.ByteString.Builder (Builder)
-import Control.Applicative
 import Control.Concurrent.STM
 import Data.Ascii (Ascii)
 import qualified Data.ByteString as BS
@@ -168,13 +168,13 @@ writeItr ∷ (Interaction → TVar a) → a → Interaction → STM ()
 writeItr accessor a itr
     = writeTVar (accessor itr) a
 
-readItr ∷ (Interaction → TVar a) → (a → b) → Interaction → STM b
+readItr ∷ (Interaction → TVar a) → Interaction → STM a
 {-# INLINE readItr #-}
-readItr accessor reader itr
-    = reader <$> readTVar (accessor itr)
+readItr accessor itr
+    = readTVar (accessor itr)
 
 updateItr ∷ (Interaction → TVar a) → (a → a) → Interaction → STM ()
 {-# INLINE updateItr #-}
 updateItr accessor updator itr
-    = do old ← readItr accessor id itr
+    = do old ← readItr accessor itr
          writeItr accessor (updator old) itr