Network.HTTP.Lucu.RequestReader
Network.HTTP.Lucu.ResponseWriter
ghc-options:
- -fglasgow-exts
-Wall
+ -XDeriveDataTypeable
+ -XUnboxedTuples
-funbox-strict-fields
Executable lucu-implant-file
Main-Is: ImplantFile.hs
ghc-options:
- -fglasgow-exts
-Wall
-funbox-strict-fields
CABAL_FILE = Lucu.cabal
GHC = ghc
-build: .setup-config Setup
+build: dist/setup-config Setup
./Setup build
run: build
@echo ".:.:. Let's go .:.:."
$(MAKE) -C examples run
-.setup-config: $(CABAL_FILE) Setup
+dist/setup-config: $(CABAL_FILE) Setup
# ./Setup configure --disable-optimization
- ./Setup configure -p --enable-split-objs
+ ./Setup configure -p -O --enable-split-objs
Setup: Setup.hs
$(GHC) --make Setup
clean:
- rm -rf dist Setup Setup.o Setup.hi .setup-config
+ rm -rf dist Setup Setup.o Setup.hi
find . -name '*~' -exec rm -f {} \;
$(MAKE) -C examples clean
-doc: .setup-config Setup
- ./Setup haddock --hyperlink-source --haddock-css=../hscolour/hscolour.css
+doc: dist/setup-config Setup
+ ./Setup haddock --hyperlink-source --hscolour-css=../hscolour/hscolour.css
install: build
sudo ./Setup install
loop so
-- 本當は Network.accept を使ひたいが、このアクションは勝手に
-- リモートのIPを逆引きするので、使へない。
- = do (h, addr) <- accept' so
- tQueue <- newInteractionQueue
- readerTID <- forkIO $ requestReader cnf tree fbs h addr tQueue
- writerTID <- forkIO $ responseWriter cnf h tQueue readerTID
+ = do (h, addr) <- accept' so
+ tQueue <- newInteractionQueue
+ readerTID <- forkIO $ requestReader cnf tree fbs h addr tQueue
+ _writerTID <- forkIO $ responseWriter cnf h tQueue readerTID
loop so
accept' :: Socket -> IO (Handle, So.SockAddr)
ErrorCall msg -> Abortion InternalServerError emptyHeaders $ Just msg
IOException ioE -> Abortion InternalServerError emptyHeaders $ Just $ formatIOE ioE
DynException dynE -> case fromDynamic dynE of
- Just (a :: Abortion) -> a
+ Just a
+ -> a :: Abortion
Nothing
-> Abortion InternalServerError emptyHeaders
$ Just $ show exc