summaryrefslogtreecommitdiff
path: root/src/Prolog.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Prolog.hs')
-rw-r--r--src/Prolog.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Prolog.hs b/src/Prolog.hs
index a688063..4b3c666 100644
--- a/src/Prolog.hs
+++ b/src/Prolog.hs
@@ -27,8 +27,8 @@ module Prolog
, SomeException (..)
, B.StrictByteString
, BL.LazyByteString
- , T.StrictText
- , TL.LazyText
+ , StrictText
+ , LazyText
-- * Strings
, IsString (..)
, StringConv (..)
@@ -83,6 +83,10 @@ import Text.Blaze.Html.Renderer.Pretty as BS
import Text.Blaze.Html.Renderer.Text as BT
import Text.Blaze.Html.Renderer.Utf8 as BB
import Text.LaTeX.Base qualified as L
+import Text.LaTeX.Base.Syntax qualified as L
+
+type StrictText = T.Text
+type LazyText = TL.Text
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
infixl 4 <<$>>
@@ -124,8 +128,8 @@ liftMaybe :: Alternative m => Maybe a -> m a
liftMaybe = maybe empty pure
{-# INLINE liftMaybe #-}
-squashMaybe :: Alternative m => m (Maybe a) -> m a
-squashmaybe = (>>= liftMaybe)
+squashMaybe :: (Alternative m, Monad m) => m (Maybe a) -> m a
+squashMaybe = (>>= liftMaybe)
{-# INLINE squashMaybe #-}
renderTo :: (StringConv T.Text s, L.Render r) => r -> s
@@ -171,10 +175,10 @@ instance StringConv L.LaTeX String where
strConv l = strConv l . L.render
instance StringConv Html T.Text where
- strConv _ = BT.renderHtml
+ strConv l = strConv l . BT.renderHtml
instance StringConv Html TL.Text where
- strConv l = strConv l . BT.renderHtml
+ strConv _ = BT.renderHtml
instance StringConv Html String where
strConv _ = BS.renderHtml