From 751303aa5effc5277a89bcbdeedb338f396d8f0b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 28 Feb 2017 20:22:10 -0700 Subject: rewrite ifScanSess --- Types/State.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/State.hs b/Types/State.hs index 31bb960..1230e31 100644 --- a/Types/State.hs +++ b/Types/State.hs @@ -86,7 +86,7 @@ data St = makeLenses ''St ifScanSess :: St -> a -> a -> a -ifScanSess st a b = if isJust $ st^.stScanSess then a else b +ifScanSess st a b = maybe b (const a) (st^.stScanSess) -- | Update a state when there is no scanning session in progress (the -- state should not be changed when some pages have already been -- cgit v1.2.3