mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 20:02:27 +03:00
ui, api: switch to the quicker-building microlens
This may not make much difference since dependencies brick and servant-swagger still depend on lens, but that might change.
This commit is contained in:
parent
6f65aa20f8
commit
f331ebec16
@ -159,7 +159,7 @@ executables:
|
||||
- Decimal
|
||||
- docopt
|
||||
- either
|
||||
- lens
|
||||
- microlens >= 0.3.5.1 && < 0.5
|
||||
- safe
|
||||
- servant-server
|
||||
- servant-swagger
|
||||
|
@ -48,7 +48,7 @@ executable hledger-api
|
||||
, Decimal
|
||||
, docopt
|
||||
, either
|
||||
, lens
|
||||
, microlens >= 0.3.5.1 && < 0.5
|
||||
, safe
|
||||
, servant-server
|
||||
, servant-swagger
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
module Main where
|
||||
|
||||
import Control.Lens ((&), (.~), (?~))
|
||||
import Lens.Micro ((&), (.~))
|
||||
import Control.Monad
|
||||
import Data.Aeson
|
||||
import qualified Data.ByteString.Lazy.Char8 as BL8
|
||||
@ -64,8 +64,8 @@ swaggerSpec :: Swagger
|
||||
swaggerSpec = toSwagger (Proxy :: Proxy HledgerApi)
|
||||
& info.infoTitle .~ "hledger API"
|
||||
& info.infoVersion .~ pack version
|
||||
& info.infoDescription ?~ "This is the API provided by hledger-api for reading hledger data"
|
||||
& info.infoLicense ?~ License "GPLv3+" (Nothing)
|
||||
& info.infoDescription .~ Just "This is the API provided by hledger-api for reading hledger data"
|
||||
& info.infoLicense .~ Just (License "GPLv3+" (Nothing))
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
@ -196,7 +196,7 @@ instance ToSchema Decimal
|
||||
where
|
||||
schema = mempty
|
||||
& schemaType .~ SwaggerNumber
|
||||
& schemaExample ?~ toJSON (100 :: Decimal)
|
||||
& schemaExample .~ Just (toJSON (100 :: Decimal))
|
||||
instance ToSchema Amount
|
||||
instance ToSchema AmountStyle
|
||||
instance ToSchema Side
|
||||
|
@ -10,7 +10,7 @@ module Hledger.UI.AccountsScreen
|
||||
)
|
||||
where
|
||||
|
||||
import Control.Lens ((^.))
|
||||
import Lens.Micro ((^.))
|
||||
-- import Control.Monad
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
-- import Data.Default
|
||||
|
@ -6,7 +6,7 @@ module Hledger.UI.ErrorScreen
|
||||
(screen)
|
||||
where
|
||||
|
||||
-- import Control.Lens ((^.))
|
||||
-- import Lens.Micro ((^.))
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
import Data.Monoid
|
||||
-- import Data.Maybe
|
||||
|
@ -10,7 +10,7 @@ Released under GPL version 3 or later.
|
||||
module Hledger.UI.Main where
|
||||
|
||||
-- import Control.Applicative
|
||||
-- import Control.Lens ((^.))
|
||||
-- import Lens.Micro ((^.))
|
||||
import Control.Monad
|
||||
-- import Control.Monad.IO.Class (liftIO)
|
||||
-- import Data.Default
|
||||
|
@ -8,7 +8,7 @@ module Hledger.UI.RegisterScreen
|
||||
)
|
||||
where
|
||||
|
||||
import Control.Lens ((^.))
|
||||
import Lens.Micro ((^.))
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
import Data.List
|
||||
import Data.List.Split (splitOn)
|
||||
|
@ -7,7 +7,7 @@ module Hledger.UI.TransactionScreen
|
||||
)
|
||||
where
|
||||
|
||||
-- import Control.Lens ((^.))
|
||||
-- import Lens.Micro ((^.))
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
-- import Data.List
|
||||
-- import Data.List.Split (splitOn)
|
||||
|
@ -18,7 +18,7 @@ module Hledger.UI.UIUtils (
|
||||
,stToggleCleared
|
||||
) where
|
||||
|
||||
import Control.Lens ((^.))
|
||||
import Lens.Micro ((^.))
|
||||
-- import Control.Monad
|
||||
-- import Control.Monad.IO.Class
|
||||
-- import Data.Default
|
||||
|
@ -75,7 +75,7 @@ executables:
|
||||
- data-default
|
||||
- filepath
|
||||
- HUnit
|
||||
- lens >= 4.12.3 && < 4.14
|
||||
- microlens >= 0.3.5.1 && < 0.5
|
||||
- safe >= 0.2
|
||||
- split >= 0.1 && < 0.3
|
||||
- transformers
|
||||
|
@ -66,7 +66,7 @@ executable hledger-ui
|
||||
, data-default
|
||||
, filepath
|
||||
, HUnit
|
||||
, lens >= 4.12.3 && < 4.14
|
||||
, microlens >= 0.3.5.1 && < 0.5
|
||||
, safe >= 0.2
|
||||
, split >= 0.1 && < 0.3
|
||||
, transformers
|
||||
|
Loading…
Reference in New Issue
Block a user