-- | Build a widget from markup.
markup :: (Eq a, GetAttr a) => Markup a -> Widget
markup m =
    Widget Fixed Fixed $ do
      let pairs = markupToList m
      imgs <- forM pairs $ \(t, aSrc) -> do
          a <- getAttr aSrc
          return $ string a $ T.unpack t
      return $ def & imageL .~ horizCat imgs
markup :: (Eq a, GetAttr a) => Markup a -> Widget
markup m =
    Widget Fixed Fixed $ do
      let pairs = markupToList m
      imgs <- forM pairs $ \(t, aSrc) -> do
          a <- getAttr aSrc
          return $ string a $ T.unpack t
      return $ def & imageL .~ horizCat imgs
markup m =
    Widget Fixed Fixed $ do
      let pairs = markupToList m
      imgs <- forM pairs $ \(t, aSrc) -> do
          a <- getAttr aSrc
          return $ string a $ T.unpack t
      return $ def & imageL .~ horizCat imgs