{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# OPTIONS_GHC -Wno-deferred-out-of-scope-variables #-} module Web.View.Render where import Data.ByteString.Lazy qualified as BL import Data.Function ((&)) import Data.List (foldl') import Data.Map qualified as M import Data.Maybe (mapMaybe) import Data.String (fromString) import Data.String.Interpolate (i) import Data.Text (Text, intercalate, pack, toLower) import Data.Text qualified as T import Data.Text.Lazy qualified as L import Data.Text.Lazy.Encoding qualified as LE import HTMLEntities.Text qualified as HE import Web.View.Types import Web.View.View (View, ViewState (..), runView) {- | Renders a 'View' as HTML with embedded CSS class definitions >>> renderText $ el bold "Hello"