1. Peter Sagerson
  2. couch-hs

Commits

Peter Sagerson  committed abc462a

Fix distribution.

  • Participants
  • Parent commits 1c91dbd
  • Branches default
  • Tags v0.1.1

Comments (0)

Files changed (2)

File couch-hs.cabal

View file
  • Ignore whitespace
 name: couch-hs
-version: 0.1.0
+version: 0.1.1
 cabal-version: >= 1.6
 build-type: Simple
 license: PublicDomain
 
     build-depends: base >= 4 && < 5
                  , random >= 1.0 && < 1.1
-                 , bytestring >= 0.9 && < 1.0
+                 , bytestring >= 0.9 && < 0.10
                  , text >= 0.11 && < 0.12
                  , vector >= 0.7 && < 0.8
                  , transformers >= 0.2 && < 0.3
 Executable couch-hs
     hs-source-dirs: source
     main-is: server.hs
+    other-modules: Database.CouchDB.ViewServer.Main
+                 , Database.CouchDB.ViewServer.Main.Options
+                 , Database.CouchDB.ViewServer.Main.Context
+                 , Database.CouchDB.ViewServer.Main.Devel
+                 , Database.CouchDB.ViewServer.Main.Server
+                 , Database.CouchDB.ViewServer.Main.Server.Command

File source/Database/CouchDB/ViewServer/Main/Server.hs

View file
  • Ignore whitespace
         Left err    -> return $ compileErrorValue err
         Right funcs -> let keys = map reduceKey args
                            values =  map reduceValue args
-                           outputs = map (\f -> execReduceFunc f keys values False) funcs
-                       in  reduceResponse outputs
+                       in  reduceResponse $ map (\f -> execReduceFunc f keys values False) funcs
 
 
 processRereduce :: [Text] -> [J.Value] -> LineProcessor ResponseValue
     eitherFuncs <- eitherReduceFuncs codes
     case eitherFuncs of
         Left err    -> return $ compileErrorValue err
-        Right funcs -> let outputs = map (\f -> execReduceFunc f [] values True) funcs
-                       in  reduceResponse outputs
+        Right funcs -> reduceResponse $ map (\f -> execReduceFunc f [] values True) funcs
 
 
 reduceResponse :: [ReduceOutput] -> LineProcessor ResponseValue