Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplified CPP strategy for dealing with HAppS and Happstack.

  • Loading branch information...
commit 6ee3269692e161ff488c53a5bd37d6357705e5b9 1 parent 6659c4e
@jgm authored
Showing with 6 additions and 7 deletions.
  1. +4 −5 Gitit/Server.hs
  2. +2 −2 gitit.cabal
View
9 Gitit/Server.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-
Copyright (C) 2008 John MacFarlane <jgm@berkeley.edu>
@@ -67,9 +66,9 @@ module Gitit.Server
, readCookieValue
)
where
-import _HAPPS.Server hiding (look, lookRead, lookPairs, mkCookie, getCookies)
-import qualified _HAPPS.Server (mkCookie)
-import _HAPPS.Server.Cookie (Cookie(..))
+import HAppS.Server hiding (look, lookRead, lookPairs, mkCookie, getCookies)
+import qualified HAppS.Server (mkCookie)
+import HAppS.Server.Cookie (Cookie(..))
import Network.Socket (getAddrInfo, defaultHints, addrAddress)
import System.IO (stderr, hPutStrLn)
import Text.Pandoc.CharacterReferences (decodeCharacterReferences)
@@ -104,7 +103,7 @@ lookRead :: Read a => String -> RqData a
lookRead = liftM read . look
mkCookie :: String -> String -> Cookie
-mkCookie name = _HAPPS.Server.mkCookie name . encodeString
+mkCookie name = HAppS.Server.mkCookie name . encodeString
-- Functions for zipping responses and setting headers.
View
4 gitit.cabal
@@ -58,10 +58,10 @@ Executable gitit
build-depends: base >= 4, syb
if flag(happstack)
build-depends: happstack-server
- cpp-options: -D_HAPPS=HAppS
+ cpp-options: -D_HAPPSTACK
else
build-depends: HAppS-Server >= 0.9.3 && < 0.9.4
- cpp-options: -D_HAPPS=HAppS
+ cpp-options: -D_HAPPS
ghc-options: -Wall -threaded
cpp-options: -D_VERSION="0.5.1"
ghc-prof-options: -auto-all
Please sign in to comment.
Something went wrong with that request. Please try again.