summaryrefslogtreecommitdiff
path: root/standalone/no-th/haskell-patches/wai-app-static_deal-with-TH.patch
blob: 76beafd03748d80e582650ca1a7062ea084fb062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From a020dd27eda45263db6ac887df4a94efb6ca86db Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Thu, 2 Jul 2015 21:36:02 +0000
Subject: [PATCH] deal with TH

---
 Network/Wai/Application/Static.hs | 4 ----
 WaiAppStatic/Storage/Embedded.hs  | 8 ++++----
 wai-app-static.cabal              | 4 +---
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs
index 228582d..7d72bb0 100644
--- a/Network/Wai/Application/Static.hs
+++ b/Network/Wai/Application/Static.hs
@@ -34,8 +34,6 @@ import Control.Monad.IO.Class (liftIO)
 
 import Blaze.ByteString.Builder (toByteString)
 
-import Data.FileEmbed (embedFile)
-
 import Data.Text (Text)
 import qualified Data.Text as T
 
@@ -218,8 +216,6 @@ staticAppPieces _ _ req sendResponse
         H.status405
         [("Content-Type", "text/plain")]
         "Only GET or HEAD is supported"
-staticAppPieces _ [".hidden", "folder.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")]
-staticAppPieces _ [".hidden", "haskell.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")]
 staticAppPieces ss rawPieces req sendResponse = liftIO $ do
     case toPieces rawPieces of
         Just pieces -> checkPieces ss pieces req >>= response
diff --git a/WaiAppStatic/Storage/Embedded.hs b/WaiAppStatic/Storage/Embedded.hs
index daa6e50..9873d4e 100644
--- a/WaiAppStatic/Storage/Embedded.hs
+++ b/WaiAppStatic/Storage/Embedded.hs
@@ -3,10 +3,10 @@ module WaiAppStatic.Storage.Embedded(
       embeddedSettings
 
     -- * Template Haskell
-    , Etag
-    , EmbeddableEntry(..)
-    , mkSettings
+    --, Etag
+    --, EmbeddableEntry(..)
+    --, mkSettings
     ) where
 
 import WaiAppStatic.Storage.Embedded.Runtime
-import WaiAppStatic.Storage.Embedded.TH
+--import WaiAppStatic.Storage.Embedded.TH
diff --git a/wai-app-static.cabal b/wai-app-static.cabal
index 4cca237..3fbfcee 100644
--- a/wai-app-static.cabal
+++ b/wai-app-static.cabal
@@ -35,7 +35,6 @@ library
                    , containers                >= 0.2
                    , time                      >= 1.1.4
                    , old-locale                >= 1.0.0.2
-                   , file-embed                >= 0.0.3.1
                    , text                      >= 0.7
                    , blaze-builder             >= 0.2.1.4
                    , base64-bytestring         >= 0.1
@@ -63,9 +62,8 @@ library
                      WaiAppStatic.Listing
                      WaiAppStatic.Types
                      WaiAppStatic.CmdLine
-    other-modules:   Util
                      WaiAppStatic.Storage.Embedded.Runtime
-                     WaiAppStatic.Storage.Embedded.TH
+    other-modules:   Util
     ghc-options:     -Wall
     extensions:     CPP
 
-- 
2.1.4