mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 20:02:27 +03:00
move JSON instances from hledger-web to hledger-lib
This commit is contained in:
parent
5a19d604b6
commit
46d516e7a3
@ -15,6 +15,7 @@ module Hledger.Data (
|
||||
module Hledger.Data.Commodity,
|
||||
module Hledger.Data.Dates,
|
||||
module Hledger.Data.Journal,
|
||||
module Hledger.Data.Json,
|
||||
module Hledger.Data.Ledger,
|
||||
module Hledger.Data.Period,
|
||||
module Hledger.Data.PeriodicTransaction,
|
||||
@ -36,6 +37,7 @@ import Hledger.Data.Amount
|
||||
import Hledger.Data.Commodity
|
||||
import Hledger.Data.Dates
|
||||
import Hledger.Data.Journal
|
||||
import Hledger.Data.Json
|
||||
import Hledger.Data.Ledger
|
||||
import Hledger.Data.Period
|
||||
import Hledger.Data.PeriodicTransaction
|
||||
|
@ -1,3 +1,7 @@
|
||||
{-
|
||||
JSON instances. Should they be in Types.hs ?
|
||||
-}
|
||||
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
|
||||
--{-# LANGUAGE CPP #-}
|
||||
@ -21,7 +25,7 @@
|
||||
--{-# LANGUAGE TypeFamilies #-}
|
||||
--{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
module Hledger.Web.Json (
|
||||
module Hledger.Data.Json (
|
||||
-- * Instances
|
||||
-- * Utilities
|
||||
readJsonFile
|
||||
@ -35,9 +39,7 @@ import Data.Decimal
|
||||
import Data.Maybe
|
||||
import GHC.Generics (Generic)
|
||||
|
||||
import Hledger.Data
|
||||
|
||||
-- JSON instances. Should they be in hledger-lib Types.hs ?
|
||||
import Hledger.Data.Types
|
||||
|
||||
-- To JSON
|
||||
|
@ -4,7 +4,7 @@ cabal-version: 1.12
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
--
|
||||
-- hash: f67238ad457aa23ba68686a932bc3f37f30d6f3f9f4514468e35e960ab81fe1b
|
||||
-- hash: c470aed5e036160325eaec9264fbff17a3dcbe8a41728d7b661c014105fe0419
|
||||
|
||||
name: hledger-lib
|
||||
version: 1.16.1
|
||||
@ -59,6 +59,7 @@ library
|
||||
Hledger.Data.Commodity
|
||||
Hledger.Data.Dates
|
||||
Hledger.Data.Journal
|
||||
Hledger.Data.Json
|
||||
Hledger.Data.Ledger
|
||||
Hledger.Data.Period
|
||||
Hledger.Data.PeriodicTransaction
|
||||
@ -107,6 +108,7 @@ library
|
||||
build-depends:
|
||||
Decimal
|
||||
, Glob >=0.9
|
||||
, aeson
|
||||
, ansi-terminal >=0.6.2.3
|
||||
, array
|
||||
, base >=4.9 && <4.14
|
||||
@ -157,6 +159,7 @@ test-suite doctest
|
||||
build-depends:
|
||||
Decimal
|
||||
, Glob >=0.7
|
||||
, aeson
|
||||
, ansi-terminal >=0.6.2.3
|
||||
, array
|
||||
, base >=4.9 && <4.14
|
||||
@ -211,6 +214,7 @@ test-suite unittest
|
||||
build-depends:
|
||||
Decimal
|
||||
, Glob >=0.9
|
||||
, aeson
|
||||
, ansi-terminal >=0.6.2.3
|
||||
, array
|
||||
, base >=4.9 && <4.14
|
||||
|
@ -43,6 +43,7 @@ extra-source-files:
|
||||
dependencies:
|
||||
- base >=4.9 && <4.14
|
||||
- base-compat-batteries >=0.10.1 && <0.12
|
||||
- aeson
|
||||
- ansi-terminal >=0.6.2.3
|
||||
- array
|
||||
- blaze-markup >=0.5.1
|
||||
@ -108,6 +109,7 @@ library:
|
||||
- Hledger.Data.Commodity
|
||||
- Hledger.Data.Dates
|
||||
- Hledger.Data.Journal
|
||||
- Hledger.Data.Json
|
||||
- Hledger.Data.Ledger
|
||||
- Hledger.Data.Period
|
||||
- Hledger.Data.PeriodicTransaction
|
||||
|
@ -19,7 +19,6 @@ import Yesod
|
||||
import Hledger
|
||||
import Hledger.Cli.Commands.Add (appendToJournalFileOrStdout, journalAddTransaction)
|
||||
import Hledger.Web.Import
|
||||
import Hledger.Web.Json ()
|
||||
import Hledger.Web.WebOptions (WebOpts(..))
|
||||
import Hledger.Web.Widget.AddForm (addForm)
|
||||
|
||||
|
@ -25,7 +25,6 @@ import qualified Data.Text as T
|
||||
import Yesod.Default.Handlers (getFaviconR, getRobotsR)
|
||||
|
||||
import Hledger
|
||||
import Hledger.Web.Json ()
|
||||
import Hledger.Web.Import
|
||||
import Hledger.Web.Widget.Common (journalFile404)
|
||||
|
||||
|
@ -4,7 +4,7 @@ cabal-version: 1.12
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
--
|
||||
-- hash: e75b2c52f9b849b13eff2f1b6d6c15c8c0d6ffcaa24883475a63d8743c2cbfa9
|
||||
-- hash: 009db76878af9603a492a0f3a9fdd46e3a4fd5795cccef390e80325ec94c8808
|
||||
|
||||
name: hledger-web
|
||||
version: 1.16.1
|
||||
@ -139,7 +139,6 @@ library
|
||||
Hledger.Web.Handler.RegisterR
|
||||
Hledger.Web.Handler.UploadR
|
||||
Hledger.Web.Import
|
||||
Hledger.Web.Json
|
||||
Hledger.Web.Main
|
||||
Hledger.Web.Settings
|
||||
Hledger.Web.Settings.StaticFiles
|
||||
|
@ -89,7 +89,6 @@ library:
|
||||
- Hledger.Web.Handler.RegisterR
|
||||
- Hledger.Web.Handler.UploadR
|
||||
- Hledger.Web.Import
|
||||
- Hledger.Web.Json
|
||||
- Hledger.Web.Main
|
||||
- Hledger.Web.Settings
|
||||
- Hledger.Web.Settings.StaticFiles
|
||||
|
@ -4,7 +4,7 @@ cabal-version: 1.12
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
--
|
||||
-- hash: 029bcf223345b932dacaaf3200f66a8d7529e1fad4bfe8343228720893aa27bb
|
||||
-- hash: 84e2963cf5ef19727a8719de14430ed621a304efb5a80cf0509872fe46f69992
|
||||
|
||||
name: hledger
|
||||
version: 1.16.1
|
||||
@ -148,6 +148,7 @@ library
|
||||
build-depends:
|
||||
Decimal
|
||||
, Diff
|
||||
, aeson
|
||||
, ansi-terminal >=0.6.2.3
|
||||
, base >=4.9 && <4.14
|
||||
, base-compat-batteries >=0.10.1 && <0.12
|
||||
@ -199,6 +200,7 @@ executable hledger
|
||||
cpp-options: -DVERSION="1.16.1"
|
||||
build-depends:
|
||||
Decimal
|
||||
, aeson
|
||||
, ansi-terminal >=0.6.2.3
|
||||
, base >=4.9 && <4.14
|
||||
, base-compat-batteries >=0.10.1 && <0.12
|
||||
@ -250,6 +252,7 @@ test-suite unittest
|
||||
cpp-options: -DVERSION="1.16.1"
|
||||
build-depends:
|
||||
Decimal
|
||||
, aeson
|
||||
, ansi-terminal >=0.6.2.3
|
||||
, base >=4.9 && <4.14
|
||||
, base-compat-batteries >=0.10.1 && <0.12
|
||||
@ -298,6 +301,7 @@ benchmark bench
|
||||
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
|
||||
build-depends:
|
||||
Decimal
|
||||
, aeson
|
||||
, ansi-terminal >=0.6.2.3
|
||||
, base >=4.9 && <4.14
|
||||
, base-compat-batteries >=0.10.1 && <0.12
|
||||
|
@ -106,6 +106,7 @@ ghc-options:
|
||||
|
||||
dependencies:
|
||||
- hledger-lib >=1.16.1 && <1.17
|
||||
- aeson
|
||||
- ansi-terminal >=0.6.2.3
|
||||
- base >=4.9 && <4.14
|
||||
- base-compat-batteries >=0.10.1 && <0.12
|
||||
|
Loading…
Reference in New Issue
Block a user