Merge pull request #91 from seagreen/focus-functor

Make FocusRing a Functor.
This commit is contained in:
Jonathan Daugherty 2016-10-31 11:31:41 -07:00 committed by GitHub
commit 036a1af956
2 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,8 @@
Brick changelog
---------------
* Make FocusRing a Functor.
0.12
----

View File

@ -1,3 +1,5 @@
{-# LANGUAGE DeriveFunctor #-}
-- | This module provides a type and functions for handling focus rings
-- of widgets. Note that this interface is merely provided for managing
-- the focus state for a sequence of resource names; it does not do
@ -25,6 +27,7 @@ import Brick.Widgets.Core (Named(..))
-- currently-focused name.
data FocusRing n = FocusRingEmpty
| FocusRingNonempty ![n] !Int
deriving Functor
-- | Construct a focus ring from the list of resource names.
focusRing :: [n] -> FocusRing n