mirror of
https://github.com/jtdaugherty/brick.git
synced 2025-01-06 05:14:11 +03:00
AttrMap: expose attribute name components
This commit is contained in:
parent
bc18ad04a5
commit
c949fe3077
@ -29,6 +29,8 @@ module Brick.AttrMap
|
||||
, attrMap
|
||||
, forceAttrMap
|
||||
, attrName
|
||||
-- * Inspection
|
||||
, attrNameComponents
|
||||
-- * Finding attributes from names
|
||||
, attrMapLookup
|
||||
-- * Manipulating attribute maps
|
||||
@ -84,6 +86,10 @@ data AttrMap = AttrMap Attr (M.Map AttrName Attr)
|
||||
attrName :: String -> AttrName
|
||||
attrName = AttrName . (:[])
|
||||
|
||||
-- | Get the components of an attribute name.
|
||||
attrNameComponents :: AttrName -> [String]
|
||||
attrNameComponents (AttrName cs) = cs
|
||||
|
||||
-- | Create an attribute map.
|
||||
attrMap :: Attr
|
||||
-- ^ The map's default attribute to be returned when a name
|
||||
|
Loading…
Reference in New Issue
Block a user