AttrMap: expose attribute name components

This commit is contained in:
Jonathan Daugherty 2017-10-29 20:26:59 -07:00
parent bc18ad04a5
commit c949fe3077

View File

@ -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