aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-02-28 20:22:10 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-02-28 20:22:10 -0700
commit751303aa5effc5277a89bcbdeedb338f396d8f0b (patch)
treee18b82019b98cea37528354d6cdd79e20e1bf8cd
parent448f0e1193a9681b66068e7595aeef8c43e99a33 (diff)
downloadsscan-751303aa5effc5277a89bcbdeedb338f396d8f0b.tar.gz
rewrite ifScanSess
-rw-r--r--Types/State.hs2
1 files changed, 1 insertions, 1 deletions
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