From 0f664057d7593048b7b100f73d100073f95cafde Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 23 Nov 2012 20:49:53 +0000 Subject: [PATCH] web: fix this dev build warning without breaking prod --- hledger-web/Handler/Post.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hledger-web/Handler/Post.hs b/hledger-web/Handler/Post.hs index 83a4328d4..f3c36df15 100644 --- a/hledger-web/Handler/Post.hs +++ b/hledger-web/Handler/Post.hs @@ -5,7 +5,8 @@ module Handler.Post where import Import import Data.Either (lefts,rights) -import Data.List (head, intercalate) +import Data.List (intercalate) +import qualified Data.List as L (head) -- qualified keeps dev & prod builds warning-free import Data.Text (unpack) import qualified Data.Text as T (null) import Text.Hamlet (shamlet) @@ -61,7 +62,7 @@ handleAdd = do [amt1,amt2] = rights amtEs -- if no errors so far, generate a transaction and balance it or get the error. tE | not $ null errs = Left errs - | otherwise = either (\e -> Left ["unbalanced postings: " ++ (head $ lines e)]) Right + | otherwise = either (\e -> Left ["unbalanced postings: " ++ (L.head $ lines e)]) Right (balanceTransaction Nothing $ nulltransaction { -- imprecise balancing tdate=parsedate date ,tdescription=desc