summaryrefslogtreecommitdiff
path: root/src/Prolog.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Prolog.hs')
-rw-r--r--src/Prolog.hs28
1 files changed, 28 insertions, 0 deletions
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