diff options
| -rw-r--r-- | hakyll.cabal | 22 | ||||
| -rw-r--r-- | src/Hakyll.hs | 5 |
2 files changed, 21 insertions, 6 deletions
diff --git a/hakyll.cabal b/hakyll.cabal index d25cbcc..3550968 100644 --- a/hakyll.cabal +++ b/hakyll.cabal @@ -52,7 +52,11 @@ Source-Repository head Flag previewServer Description: Include the preview server - default: True + Default: True + +Flag unixFilter + Description: Include the UnixFilter module + Default: True Library Ghc-Options: -Wall @@ -78,8 +82,7 @@ Library regex-base >= 0.93 && < 0.94, regex-tdfa >= 1.1 && < 1.2, tagsoup >= 0.12.6 && < 0.13, - time >= 1.1 && < 1.5, - unix >= 2.4 && < 2.6 + time >= 1.1 && < 1.5 Exposed-Modules: Hakyll @@ -99,7 +102,6 @@ Library Hakyll.Core.Rules Hakyll.Core.Run Hakyll.Core.Store - Hakyll.Core.UnixFilter Hakyll.Core.Util.Arrow Hakyll.Core.Util.File Hakyll.Core.Util.String @@ -138,12 +140,20 @@ Library Build-depends: snap-core >= 0.6 && < 0.9, snap-server >= 0.6 && < 0.9 - Cpp-Options: + Cpp-options: -DPREVIEW_SERVER - Other-Modules: + Other-modules: Hakyll.Web.Preview.Poll Hakyll.Web.Preview.Server + If flag(unixFilter) + Build-depends: + unix >= 2.4 && < 2.6 + Cpp-options: + -DUNIX_FILTER + Other-modules: + Hakyll.Core.UnixFilter + Test-suite hakyll-tests Type: exitcode-stdio-1.0 Hs-source-dirs: src tests diff --git a/src/Hakyll.hs b/src/Hakyll.hs index 9dd10a0..249d3a8 100644 --- a/src/Hakyll.hs +++ b/src/Hakyll.hs @@ -1,5 +1,6 @@ -- | Top-level module exporting all modules that are interesting for the user -- +{-# LANGUAGE CPP #-} module Hakyll ( module Hakyll.Core.Compiler , module Hakyll.Core.Configuration @@ -9,7 +10,9 @@ module Hakyll , module Hakyll.Core.Resource.Provider , module Hakyll.Core.Routes , module Hakyll.Core.Rules +#ifdef UNIX_FILTER , module Hakyll.Core.UnixFilter +#endif , module Hakyll.Core.Util.Arrow , module Hakyll.Core.Util.File , module Hakyll.Core.Util.String @@ -43,7 +46,9 @@ import Hakyll.Core.Resource import Hakyll.Core.Resource.Provider import Hakyll.Core.Routes import Hakyll.Core.Rules +#ifdef UNIX_FILTER import Hakyll.Core.UnixFilter +#endif import Hakyll.Core.Util.Arrow import Hakyll.Core.Util.File import Hakyll.Core.Util.String |
