[build] Use Stack for building
This commit is contained in:
parent
3a86d653ce
commit
853be2a99c
5 changed files with 55 additions and 36 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@ BlogState/
|
||||||
dist/
|
dist/
|
||||||
.cabal-sandbox/
|
.cabal-sandbox/
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
.stack-work/
|
||||||
|
|
|
@ -14,37 +14,37 @@ Executable tazblog
|
||||||
hs-source-dirs: src
|
hs-source-dirs: src
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
ghc-options: -O2
|
ghc-options: -O2
|
||||||
Build-depends:
|
Build-depends: base,
|
||||||
base,
|
bytestring,
|
||||||
bytestring,
|
happstack-server,
|
||||||
happstack-server,
|
text,
|
||||||
text,
|
blaze-html,
|
||||||
blaze-html,
|
blaze-markup,
|
||||||
blaze-markup,
|
crypto-api,
|
||||||
crypto-api,
|
cryptohash,
|
||||||
cryptohash,
|
old-locale,
|
||||||
old-locale,
|
time,
|
||||||
time,
|
base64-bytestring,
|
||||||
base64-bytestring,
|
acid-state,
|
||||||
acid-state,
|
ixset,
|
||||||
ixset,
|
safecopy,
|
||||||
safecopy,
|
mtl,
|
||||||
mtl,
|
transformers,
|
||||||
transformers,
|
network,
|
||||||
network,
|
network-uri,
|
||||||
options,
|
options,
|
||||||
rss,
|
rss,
|
||||||
hamlet,
|
hamlet,
|
||||||
shakespeare,
|
shakespeare,
|
||||||
markdown
|
markdown
|
||||||
extensions:
|
extensions:
|
||||||
DeriveDataTypeable
|
DeriveDataTypeable
|
||||||
FlexibleContexts
|
FlexibleContexts
|
||||||
GeneralizedNewtypeDeriving
|
GeneralizedNewtypeDeriving
|
||||||
MultiParamTypeClasses
|
MultiParamTypeClasses
|
||||||
OverloadedStrings
|
OverloadedStrings
|
||||||
RecordWildCards
|
RecordWildCards
|
||||||
ScopedTypeVariables
|
ScopedTypeVariables
|
||||||
TemplateHaskell
|
TemplateHaskell
|
||||||
TypeFamilies
|
TypeFamilies
|
||||||
QuasiQuotes
|
QuasiQuotes
|
||||||
|
|
|
@ -10,7 +10,6 @@ import Data.Text (Text, append, empty, pack)
|
||||||
import Data.Text.Lazy (fromStrict)
|
import Data.Text.Lazy (fromStrict)
|
||||||
import Data.Time
|
import Data.Time
|
||||||
import Locales
|
import Locales
|
||||||
import System.Locale (defaultTimeLocale)
|
|
||||||
import Text.Blaze.Html (preEscapedToHtml)
|
import Text.Blaze.Html (preEscapedToHtml)
|
||||||
import Text.Hamlet
|
import Text.Hamlet
|
||||||
import Text.Lucius
|
import Text.Lucius
|
||||||
|
@ -30,7 +29,7 @@ show' = pack . show
|
||||||
|
|
||||||
-- |After this time all entries are Markdown
|
-- |After this time all entries are Markdown
|
||||||
markdownCutoff :: UTCTime
|
markdownCutoff :: UTCTime
|
||||||
markdownCutoff = fromJust $ parseTime defaultTimeLocale "%s" "1367149834"
|
markdownCutoff = fromJust $ parseTimeM False defaultTimeLocale "%s" "1367149834"
|
||||||
|
|
||||||
|
|
||||||
-- blog CSS (admin is still static)
|
-- blog CSS (admin is still static)
|
||||||
|
|
|
@ -16,7 +16,6 @@ import qualified Data.Text as T
|
||||||
import Data.Time
|
import Data.Time
|
||||||
import Happstack.Server hiding (Session)
|
import Happstack.Server hiding (Session)
|
||||||
import Happstack.Server.Compression
|
import Happstack.Server.Compression
|
||||||
import System.Locale (defaultTimeLocale)
|
|
||||||
|
|
||||||
import Blog
|
import Blog
|
||||||
import BlogDB hiding (updateEntry)
|
import BlogDB hiding (updateEntry)
|
||||||
|
|
20
stack.yaml
Normal file
20
stack.yaml
Normal file
|
@ -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: []
|
Loading…
Reference in a new issue