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:
Simon Michael 2016-04-04 17:44:29 -07:00
parent 6f65aa20f8
commit f331ebec16
11 changed files with 14 additions and 14 deletions

View File

@ -159,7 +159,7 @@ executables:
- Decimal
- docopt
- either
- lens
- microlens >= 0.3.5.1 && < 0.5
- safe
- servant-server
- servant-swagger

View File

@ -48,7 +48,7 @@ executable hledger-api
, Decimal
, docopt
, either
, lens
, microlens >= 0.3.5.1 && < 0.5
, safe
, servant-server
, servant-swagger

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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