-- | Cons the 'Window' onto the 'WindowHistory' if it is not
-- already there, or move it to the front if it is.
makeFirst :: Window -> WindowHistory -> WindowHistory
makeFirst w v = let (xs, ys) = break (w ==) $ history v
                in v { history = w : (xs ++ drop 1 ys) }
makeFirst :: Window -> WindowHistory -> WindowHistory
makeFirst w v = let (xs, ys) = break (w ==) $ history v
                in v { history = w : (xs ++ drop 1 ys) }
makeFirst w v = let (xs, ys) = break (w ==) $ history v
                in v { history = w : (xs ++ drop 1 ys) }