on master help sign in
Make UnixFilter module optional
commit84b5b16108e73d79c882f1e5ff7bebd7fa85c5ac authorJasper Van der Jeugt <m@jaspervdj.be> dateThu 17 May 2012, 11:46 (14 years ago) parent759f1e6
2 files changed+21−6
hakyll.cabal+16−6 src/Hakyll.hs+5
hakyll.cabal+16−6
@@ -52,7 +52,11 @@ Source-Repository head
5252
5353Flag previewServer
5454 Description: Include the preview server
55− default: True
55+ Default: True
56+
57+Flag unixFilter
58+ Description: Include the UnixFilter module
59+ Default: True
5660
5761Library
5862 Ghc-Options: -Wall
@@ -78,8 +82,7 @@ Library
7882 regex-base >= 0.93 && < 0.94,
7983 regex-tdfa >= 1.1 && < 1.2,
8084 tagsoup >= 0.12.6 && < 0.13,
81− time >= 1.1 && < 1.5,
82− unix >= 2.4 && < 2.6
85+ time >= 1.1 && < 1.5
8386
8487 Exposed-Modules:
8588 Hakyll
@@ -99,7 +102,6 @@ Library
99102 Hakyll.Core.Rules
100103 Hakyll.Core.Run
101104 Hakyll.Core.Store
102− Hakyll.Core.UnixFilter
103105 Hakyll.Core.Util.Arrow
104106 Hakyll.Core.Util.File
105107 Hakyll.Core.Util.String
@@ -138,12 +140,20 @@ Library
138140 Build-depends:
139141 snap-core >= 0.6 && < 0.9,
140142 snap-server >= 0.6 && < 0.9
141− Cpp-Options:
143+ Cpp-options:
142144 -DPREVIEW_SERVER
143− Other-Modules:
145+ Other-modules:
144146 Hakyll.Web.Preview.Poll
145147 Hakyll.Web.Preview.Server
146148
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+
147157Test-suite hakyll-tests
148158 Type: exitcode-stdio-1.0
149159 Hs-source-dirs: src tests
src/Hakyll.hs+5
@@ -1,5 +1,6 @@
11-- | Top-level module exporting all modules that are interesting for the user
22--
3+{-# LANGUAGE CPP #-}
34module Hakyll
45 ( module Hakyll.Core.Compiler
56 , module Hakyll.Core.Configuration
@@ -9,7 +10,9 @@ module Hakyll
910 , module Hakyll.Core.Resource.Provider
1011 , module Hakyll.Core.Routes
1112 , module Hakyll.Core.Rules
13+#ifdef UNIX_FILTER
1214 , module Hakyll.Core.UnixFilter
15+#endif
1316 , module Hakyll.Core.Util.Arrow
1417 , module Hakyll.Core.Util.File
1518 , module Hakyll.Core.Util.String
@@ -43,7 +46,9 @@ import Hakyll.Core.Resource
4346import Hakyll.Core.Resource.Provider
4447import Hakyll.Core.Routes
4548import Hakyll.Core.Rules
49+#ifdef UNIX_FILTER
4650import Hakyll.Core.UnixFilter
51+#endif
4752import Hakyll.Core.Util.Arrow
4853import Hakyll.Core.Util.File
4954import Hakyll.Core.Util.String