Modif : Format.Ledger.Write.Error_invalid_{day => date}.
authorJulien Moutinho <julm+hcompta@autogeree.net>
Thu, 28 May 2015 01:19:22 +0000 (03:19 +0200)
committerJulien Moutinho <julm+hcompta@autogeree.net>
Thu, 28 May 2015 06:24:52 +0000 (08:24 +0200)
lib/Hcompta/Format/Ledger.hs
lib/Hcompta/Format/Ledger/Read.hs

index 3b7ab56d09603132a97e4d9cb76e19f258d3644e..93f58271c51d3e649fc8c6ceac8ede2653191168 100644 (file)
@@ -82,12 +82,10 @@ transaction =
         , transaction_tags = Data.Map.empty
         }
 
--- ** The 'Transaction_by_Date' mapping
-
 type Transaction_by_Date
  = Data.Map.Map Date.UTC [Transaction]
 
--- | Return a Data.'Data.Map.Map' associating
+-- | Return a 'Data.Map.Map' associating
 --   the given 'Transaction's with their respective 'Date'.
 transaction_by_Date :: [Transaction] -> Transaction_by_Date
 transaction_by_Date =
index f4cc869f5eb8031c7b8251404fccf45bc772527d..bcb8ba16b366654d6b862daedbd202c3ab8bc84b 100644 (file)
@@ -96,7 +96,7 @@ nil_Context =
 
 data Error
  =   Error_year_or_day_is_missing
- |   Error_invalid_day (Integer, Int, Int)
+ |   Error_invalid_date (Integer, Int, Int)
  |   Error_invalid_time_of_day (Int, Int, Integer)
  |   Error_transaction_not_equilibrated Transaction [Calc.Balance.Unit_Sum Amount]
  |   Error_virtual_transaction_not_equilibrated Transaction [Calc.Balance.Unit_Sum Amount]
@@ -375,7 +375,7 @@ date def_year = (do
        guard $ month >= 1 && month <= 12
        guard $ day   >= 1 && day   <= 31
        day_ <- case Time.fromGregorianValid year month day of
-        Nothing   -> R.fail_with "date" (Error_invalid_day (year, month, day))
+        Nothing   -> R.fail_with "date" (Error_invalid_date (year, month, day))
         Just day_ -> return day_
        (hour, minu, sec, tz) <-
                R.option (0, 0, 0, Time.utc) $ R.try $ do