Rename with to withLens

This commit is contained in:
Jonathan Daugherty 2015-05-25 22:05:32 -07:00
parent 9ef4fa3a95
commit d17754b35f
3 changed files with 6 additions and 6 deletions

View File

@ -45,11 +45,11 @@ drawUI st = [a]
vCenter $
(hCenter $ borderWithLabel bs bsName $
(hLimit 25 (
(vLimit 1 $ useAttr (cyan `on` blue) $ with stEditor drawEditor)
(vLimit 1 $ useAttr (cyan `on` blue) $ withLens stEditor drawEditor)
<<=
hBorder bs
=>>
(vLimit 10 $ with stList drawList)
(vLimit 10 $ withLens stList drawList)
)))
<<=
(vLimit 1 $ vPad ' ')

View File

@ -24,7 +24,7 @@ module Brick.Prim
, saveSize
, hRelease
, vRelease
, with
, withLens
, readState
, apply
)

View File

@ -31,7 +31,7 @@ module Brick.Prim.Internal
, saveSize
, hRelease
, vRelease
, with
, withLens
, readState
, apply
)
@ -279,8 +279,8 @@ hRelease = withReaderT (& w .~ unrestricted) --- NB
vRelease :: Prim a -> Prim a
vRelease = withReaderT (& h .~ unrestricted) --- NB
with :: (Lens' a b) -> Prim b -> Prim a
with target p = do
withLens :: (Lens' a b) -> Prim b -> Prim a
withLens target p = do
outerState <- lift get
let oldInnerState = outerState^.target
c <- ask