]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Interaction.hs
ResponseWriter now compiles.
[Lucu.git] / Network / HTTP / Lucu / Interaction.hs
index 46e32a139a37d17b88b0dce43e05540dc0cbd79f..1c2679cd9eee65d14c5bf70d0a0b623e3abbe616 100644 (file)
@@ -17,7 +17,6 @@ module Network.HTTP.Lucu.Interaction
     )
     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 +167,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