From c28026bd575287cfa6b25dd85e504bdd7d0d9ca2 Mon Sep 17 00:00:00 2001 From: Zachary Juang Date: Sat, 23 Nov 2024 19:50:53 -0500 Subject: [PATCH] tweak --- app/Main.hs | 6 +++--- dev_server.sh | 3 ++- haskell-blog.cabal | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 75f539d..eb5e2f3 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,5 +1,6 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TemplateHaskell #-} module Main where @@ -161,8 +162,7 @@ main = do runDb "blog" - ( find (select (getPost pid) "posts") >>= M.rest - ) + (find (select (getPost pid) "posts") >>= M.rest) >>= \case [] -> do status status404 @@ -204,8 +204,8 @@ main = do H.h2 "Tags" H.ul $ forM_ (tags summary) $ \t -> do + let tagUrl = fromString . T.unpack $ "/posts/tags/" <> tagName t H.li $ do - let tagUrl = fromString . T.unpack $ "/posts/tags/" <> tagName t H.a H.! A.href tagUrl H.! hx PushUrl "true" diff --git a/dev_server.sh b/dev_server.sh index 57a9915..0556e0d 100755 --- a/dev_server.sh +++ b/dev_server.sh @@ -8,7 +8,8 @@ sigint_handler() trap sigint_handler SIGINT -while true; do +while true; +do $@ & PID=$! fswatch -1 app/ *.cabal diff --git a/haskell-blog.cabal b/haskell-blog.cabal index f2a6c14..c7ac775 100644 --- a/haskell-blog.cabal +++ b/haskell-blog.cabal @@ -51,7 +51,7 @@ extra-doc-files: CHANGELOG.md -- extra-source-files: common warnings - ghc-options: -Wall -Wunused-packages + ghc-options: -Wall executable haskell-blog -- Import common warning flags. @@ -92,7 +92,6 @@ executable haskell-blog directory, pandoc, pandoc-types, - template-haskell, unix, time, transformers,