about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2015-11-19T15·21+0100
committerVincent Ambo <tazjin@gmail.com>2015-11-19T15·21+0100
commit853be2a99c4f4cd8a75f807d37fb97ec1497215d (patch)
tree5121ac03a3f7f431c23a25be3f84ff6c9778c393
parent3a86d653ce759d6e9daff93d0da8fa588d3b404e (diff)
[build] Use Stack for building
-rw-r--r--.gitignore1
-rw-r--r--TazBlog.cabal66
-rw-r--r--src/Blog.hs3
-rw-r--r--src/Server.hs1
-rw-r--r--stack.yaml20
5 files changed, 55 insertions, 36 deletions
diff --git a/.gitignore b/.gitignore
index 8bfbf2a3891b..a95070c31f1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ BlogState/
 dist/
 .cabal-sandbox/
 *.tar.gz
+.stack-work/
diff --git a/TazBlog.cabal b/TazBlog.cabal
index 6d0093c0b582..f3daba16f712 100644
--- a/TazBlog.cabal
+++ b/TazBlog.cabal
@@ -14,37 +14,37 @@ Executable tazblog
   hs-source-dirs: src
   main-is: Main.hs
   ghc-options: -O2
-  Build-depends:
-    base,
-    bytestring,
-    happstack-server,
-    text,
-    blaze-html,
-    blaze-markup,
-    crypto-api,
-    cryptohash,
-    old-locale,
-    time,
-    base64-bytestring,
-    acid-state,
-    ixset,
-    safecopy,
-    mtl,
-    transformers,
-    network,
-    options,
-    rss,
-    hamlet,
-    shakespeare,
-    markdown
+  Build-depends: base,
+                 bytestring,
+                 happstack-server,
+                 text,
+                 blaze-html,
+                 blaze-markup,
+                 crypto-api,
+                 cryptohash,
+                 old-locale,
+                 time,
+                 base64-bytestring,
+                 acid-state,
+                 ixset,
+                 safecopy,
+                 mtl,
+                 transformers,
+                 network,
+                 network-uri,
+                 options,
+                 rss,
+                 hamlet,
+                 shakespeare,
+                 markdown
   extensions:
-    DeriveDataTypeable
-    FlexibleContexts
-    GeneralizedNewtypeDeriving
-    MultiParamTypeClasses
-    OverloadedStrings
-    RecordWildCards
-    ScopedTypeVariables
-    TemplateHaskell
-    TypeFamilies
-    QuasiQuotes
+             DeriveDataTypeable
+             FlexibleContexts
+             GeneralizedNewtypeDeriving
+             MultiParamTypeClasses
+             OverloadedStrings
+             RecordWildCards
+             ScopedTypeVariables
+             TemplateHaskell
+             TypeFamilies
+             QuasiQuotes
diff --git a/src/Blog.hs b/src/Blog.hs
index 60d87f2907c1..5659ad5955cd 100644
--- a/src/Blog.hs
+++ b/src/Blog.hs
@@ -10,7 +10,6 @@ import           Data.Text                 (Text, append, empty, pack)
 import           Data.Text.Lazy            (fromStrict)
 import           Data.Time
 import           Locales
-import           System.Locale             (defaultTimeLocale)
 import           Text.Blaze.Html           (preEscapedToHtml)
 import           Text.Hamlet
 import           Text.Lucius
@@ -30,7 +29,7 @@ show' = pack . show
 
 -- |After this time all entries are Markdown
 markdownCutoff :: UTCTime
-markdownCutoff = fromJust $ parseTime defaultTimeLocale "%s" "1367149834"
+markdownCutoff = fromJust $ parseTimeM False defaultTimeLocale "%s" "1367149834"
 
 
 -- blog CSS (admin is still static)
diff --git a/src/Server.hs b/src/Server.hs
index 5921aead1afe..85dc06e53690 100644
--- a/src/Server.hs
+++ b/src/Server.hs
@@ -16,7 +16,6 @@ import qualified Data.Text                    as T
 import           Data.Time
 import           Happstack.Server             hiding (Session)
 import           Happstack.Server.Compression
-import           System.Locale                (defaultTimeLocale)
 
 import Blog
 import BlogDB  hiding (updateEntry)
diff --git a/stack.yaml b/stack.yaml
new file mode 100644
index 000000000000..16b13a65f84f
--- /dev/null
+++ b/stack.yaml
@@ -0,0 +1,20 @@
+# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
+
+# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
+resolver: lts-3.14
+
+# Local packages, usually specified by relative directory name
+packages:
+- '.'
+
+# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
+extra-deps:
+  - ixset-1.0.6
+  - syb-with-class-0.6.1.6 # needed by ixset
+  - rss-3000.2.0.5
+
+# Override default flag values for local packages and extra-deps
+flags: {}
+
+# Extra package databases containing global packages
+extra-package-dbs: []