From 55cb5ce03c2c5294d1ca4cff12efa2d7c211ea53 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Tue, 8 May 2007 18:38:22 +0200 Subject: Remove unsafe fromJust darcs-hash:20070508163822-a5988-cb12015569105b9e646a5c12fc8dc02099a4beed --- StackSet.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'StackSet.hs') diff --git a/StackSet.hs b/StackSet.hs index b7419f1..7607fb3 100644 --- a/StackSet.hs +++ b/StackSet.hs @@ -111,7 +111,7 @@ index k w = fmap (uncurry (++)) $ M.lookup k (stacks w) view :: (Integral i, Integral j) => i -> StackSet i j a -> StackSet i j a view n w | M.member n (stacks w) = if M.member n (ws2screen w) then w { current = n } - else tweak (fromJust $ screen (current w) w) + else maybe w tweak (screen (current w) w) | otherwise = w where tweak sc = w { screen2ws = M.insert sc n (screen2ws w) -- cgit v1.2.3