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 - Decimal
- docopt - docopt
- either - either
- lens - microlens >= 0.3.5.1 && < 0.5
- safe - safe
- servant-server - servant-server
- servant-swagger - servant-swagger

View File

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

View File

@ -11,7 +11,7 @@
module Main where module Main where
import Control.Lens ((&), (.~), (?~)) import Lens.Micro ((&), (.~))
import Control.Monad import Control.Monad
import Data.Aeson import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BL8 import qualified Data.ByteString.Lazy.Char8 as BL8
@ -64,8 +64,8 @@ swaggerSpec :: Swagger
swaggerSpec = toSwagger (Proxy :: Proxy HledgerApi) swaggerSpec = toSwagger (Proxy :: Proxy HledgerApi)
& info.infoTitle .~ "hledger API" & info.infoTitle .~ "hledger API"
& info.infoVersion .~ pack version & info.infoVersion .~ pack version
& info.infoDescription ?~ "This is the API provided by hledger-api for reading hledger data" & info.infoDescription .~ Just "This is the API provided by hledger-api for reading hledger data"
& info.infoLicense ?~ License "GPLv3+" (Nothing) & info.infoLicense .~ Just (License "GPLv3+" (Nothing))
main :: IO () main :: IO ()
main = do main = do
@ -196,7 +196,7 @@ instance ToSchema Decimal
where where
schema = mempty schema = mempty
& schemaType .~ SwaggerNumber & schemaType .~ SwaggerNumber
& schemaExample ?~ toJSON (100 :: Decimal) & schemaExample .~ Just (toJSON (100 :: Decimal))
instance ToSchema Amount instance ToSchema Amount
instance ToSchema AmountStyle instance ToSchema AmountStyle
instance ToSchema Side instance ToSchema Side

View File

@ -10,7 +10,7 @@ module Hledger.UI.AccountsScreen
) )
where where
import Control.Lens ((^.)) import Lens.Micro ((^.))
-- import Control.Monad -- import Control.Monad
import Control.Monad.IO.Class (liftIO) import Control.Monad.IO.Class (liftIO)
-- import Data.Default -- import Data.Default

View File

@ -6,7 +6,7 @@ module Hledger.UI.ErrorScreen
(screen) (screen)
where where
-- import Control.Lens ((^.)) -- import Lens.Micro ((^.))
import Control.Monad.IO.Class (liftIO) import Control.Monad.IO.Class (liftIO)
import Data.Monoid import Data.Monoid
-- import Data.Maybe -- import Data.Maybe

View File

@ -10,7 +10,7 @@ Released under GPL version 3 or later.
module Hledger.UI.Main where module Hledger.UI.Main where
-- import Control.Applicative -- import Control.Applicative
-- import Control.Lens ((^.)) -- import Lens.Micro ((^.))
import Control.Monad import Control.Monad
-- import Control.Monad.IO.Class (liftIO) -- import Control.Monad.IO.Class (liftIO)
-- import Data.Default -- import Data.Default

View File

@ -8,7 +8,7 @@ module Hledger.UI.RegisterScreen
) )
where where
import Control.Lens ((^.)) import Lens.Micro ((^.))
import Control.Monad.IO.Class (liftIO) import Control.Monad.IO.Class (liftIO)
import Data.List import Data.List
import Data.List.Split (splitOn) import Data.List.Split (splitOn)

View File

@ -7,7 +7,7 @@ module Hledger.UI.TransactionScreen
) )
where where
-- import Control.Lens ((^.)) -- import Lens.Micro ((^.))
import Control.Monad.IO.Class (liftIO) import Control.Monad.IO.Class (liftIO)
-- import Data.List -- import Data.List
-- import Data.List.Split (splitOn) -- import Data.List.Split (splitOn)

View File

@ -18,7 +18,7 @@ module Hledger.UI.UIUtils (
,stToggleCleared ,stToggleCleared
) where ) where
import Control.Lens ((^.)) import Lens.Micro ((^.))
-- import Control.Monad -- import Control.Monad
-- import Control.Monad.IO.Class -- import Control.Monad.IO.Class
-- import Data.Default -- import Data.Default

View File

@ -75,7 +75,7 @@ executables:
- data-default - data-default
- filepath - filepath
- HUnit - HUnit
- lens >= 4.12.3 && < 4.14 - microlens >= 0.3.5.1 && < 0.5
- safe >= 0.2 - safe >= 0.2
- split >= 0.1 && < 0.3 - split >= 0.1 && < 0.3
- transformers - transformers

View File

@ -66,7 +66,7 @@ executable hledger-ui
, data-default , data-default
, filepath , filepath
, HUnit , HUnit
, lens >= 4.12.3 && < 4.14 , microlens >= 0.3.5.1 && < 0.5
, safe >= 0.2 , safe >= 0.2
, split >= 0.1 && < 0.3 , split >= 0.1 && < 0.3
, transformers , transformers