mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-12-03 11:41:06 +03:00
Merge pull request #91 from seagreen/focus-functor
Make FocusRing a Functor.
This commit is contained in:
commit
036a1af956
@ -2,6 +2,8 @@
|
||||
Brick changelog
|
||||
---------------
|
||||
|
||||
* Make FocusRing a Functor.
|
||||
|
||||
0.12
|
||||
----
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user