on master help sign in
Make UnixFilter module optional
84b5b16Jasper Van der Jeugt
hakyll.cabal+16−6
@@ -52,7 +52,11 @@ Source-Repository head
52
52
53Flag previewServer
53Flag previewServer
54 Description: Include the preview server
54 Description: Include the preview server
55− default: True
55+ Default: True
56+
57+Flag unixFilter
58+ Description: Include the UnixFilter module
59+ Default: True
56
60
57Library
61Library
58 Ghc-Options: -Wall
62 Ghc-Options: -Wall
@@ -78,8 +82,7 @@ Library
78 regex-base >= 0.93 && < 0.94,
82 regex-base >= 0.93 && < 0.94,
79 regex-tdfa >= 1.1 && < 1.2,
83 regex-tdfa >= 1.1 && < 1.2,
80 tagsoup >= 0.12.6 && < 0.13,
84 tagsoup >= 0.12.6 && < 0.13,
81− time >= 1.1 && < 1.5,
85+ time >= 1.1 && < 1.5
82− unix >= 2.4 && < 2.6
83
86
84 Exposed-Modules:
87 Exposed-Modules:
85 Hakyll
88 Hakyll
@@ -99,7 +102,6 @@ Library
99 Hakyll.Core.Rules
102 Hakyll.Core.Rules
100 Hakyll.Core.Run
103 Hakyll.Core.Run
101 Hakyll.Core.Store
104 Hakyll.Core.Store
102− Hakyll.Core.UnixFilter
103 Hakyll.Core.Util.Arrow
105 Hakyll.Core.Util.Arrow
104 Hakyll.Core.Util.File
106 Hakyll.Core.Util.File
105 Hakyll.Core.Util.String
107 Hakyll.Core.Util.String
@@ -138,12 +140,20 @@ Library
138 Build-depends:
140 Build-depends:
139 snap-core >= 0.6 && < 0.9,
141 snap-core >= 0.6 && < 0.9,
140 snap-server >= 0.6 && < 0.9
142 snap-server >= 0.6 && < 0.9
141− Cpp-Options:
143+ Cpp-options:
142 -DPREVIEW_SERVER
144 -DPREVIEW_SERVER
143− Other-Modules:
145+ Other-modules:
144 Hakyll.Web.Preview.Poll
146 Hakyll.Web.Preview.Poll
145 Hakyll.Web.Preview.Server
147 Hakyll.Web.Preview.Server
146
148
149+ If flag(unixFilter)
150+ Build-depends:
151+ unix >= 2.4 && < 2.6
152+ Cpp-options:
153+ -DUNIX_FILTER
154+ Other-modules:
155+ Hakyll.Core.UnixFilter
156+
147Test-suite hakyll-tests
157Test-suite hakyll-tests
148 Type: exitcode-stdio-1.0
158 Type: exitcode-stdio-1.0
149 Hs-source-dirs: src tests
159 Hs-source-dirs: src tests
src/Hakyll.hs+5
@@ -1,5 +1,6 @@
1-- | Top-level module exporting all modules that are interesting for the user
1-- | Top-level module exporting all modules that are interesting for the user
2--
2--
3+{-# LANGUAGE CPP #-}
3module Hakyll
4module Hakyll
4 ( module Hakyll.Core.Compiler
5 ( module Hakyll.Core.Compiler
5 , module Hakyll.Core.Configuration
6 , module Hakyll.Core.Configuration
@@ -9,7 +10,9 @@ module Hakyll
9 , module Hakyll.Core.Resource.Provider
10 , module Hakyll.Core.Resource.Provider
10 , module Hakyll.Core.Routes
11 , module Hakyll.Core.Routes
11 , module Hakyll.Core.Rules
12 , module Hakyll.Core.Rules
13+#ifdef UNIX_FILTER
12 , module Hakyll.Core.UnixFilter
14 , module Hakyll.Core.UnixFilter
15+#endif
13 , module Hakyll.Core.Util.Arrow
16 , module Hakyll.Core.Util.Arrow
14 , module Hakyll.Core.Util.File
17 , module Hakyll.Core.Util.File
15 , module Hakyll.Core.Util.String
18 , module Hakyll.Core.Util.String
@@ -43,7 +46,9 @@ import Hakyll.Core.Resource
43import Hakyll.Core.Resource.Provider
46import Hakyll.Core.Resource.Provider
44import Hakyll.Core.Routes
47import Hakyll.Core.Routes
45import Hakyll.Core.Rules
48import Hakyll.Core.Rules
49+#ifdef UNIX_FILTER
46import Hakyll.Core.UnixFilter
50import Hakyll.Core.UnixFilter
51+#endif
47import Hakyll.Core.Util.Arrow
52import Hakyll.Core.Util.Arrow
48import Hakyll.Core.Util.File
53import Hakyll.Core.Util.File
49import Hakyll.Core.Util.String
54import Hakyll.Core.Util.String