From c9e6d0ebabecf04e8f091234d293a85afe712057 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Fri, 31 Jan 2025 13:19:33 -0600 Subject: Adding more functionality --- src/Prolog.hs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/Prolog.hs') diff --git a/src/Prolog.hs b/src/Prolog.hs index 4b3c666..a6ac1b5 100644 --- a/src/Prolog.hs +++ b/src/Prolog.hs @@ -21,6 +21,7 @@ module Prolog -- * Types , Binary , Generic + , Generic1 , Generically (..) , MonadThrow (..) , Exception (..) @@ -76,8 +77,10 @@ import Data.String.Conv import Data.Text qualified as T import Data.Text.Lazy qualified as TL import GHC.Generics +import Network.URI import Hakyll qualified as H +import Text.Blaze import Text.Blaze.Html import Text.Blaze.Html.Renderer.Pretty as BS import Text.Blaze.Html.Renderer.Text as BT @@ -147,6 +150,8 @@ instance Binary L.MathType instance Binary L.Measure instance Binary L.TeXArg instance Binary L.LaTeX +instance Binary URIAuth +instance Binary URI instance H.Writable L.LaTeX where write p = L.renderFile p . H.itemBody @@ -188,3 +193,26 @@ instance StringConv Html B.ByteString where instance StringConv Html BL.ByteString where strConv _ = BB.renderHtml + +instance StringConv URI String where + strConv _ = show + +instance StringConv URI T.Text where + strConv l = strConv l . show + +instance StringConv URI TL.Text where + strConv l = strConv l . show + +instance StringConv URI B.ByteString where + strConv l = strConv l . show + +instance StringConv URI BL.ByteString where + strConv l = strConv l . show + +instance ToMarkup URI where + toMarkup = toMarkup . show + preEscapedToMarkup = preEscapedToMarkup . show + +instance ToValue URI where + toValue = toValue . show + preEscapedToValue = preEscapedToValue . show -- cgit v1.2.3