diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-28 20:22:10 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-28 20:22:10 -0700 |
commit | 751303aa5effc5277a89bcbdeedb338f396d8f0b (patch) | |
tree | e18b82019b98cea37528354d6cdd79e20e1bf8cd /Types | |
parent | 448f0e1193a9681b66068e7595aeef8c43e99a33 (diff) | |
download | sscan-751303aa5effc5277a89bcbdeedb338f396d8f0b.tar.gz |
rewrite ifScanSess
Diffstat (limited to 'Types')
-rw-r--r-- | Types/State.hs | 2 |
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 |