From 9096e371ceb247af6ef6ec1b0a5551d805b59f4c Mon Sep 17 00:00:00 2001 From: Pere Lev Date: Thu, 14 Mar 2024 22:25:08 +0200 Subject: [PATCH] Export renderSubURI to aid debugging --- src/Network/FedURI.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Network/FedURI.hs b/src/Network/FedURI.hs index 8d7a5cd..ca8b178 100644 --- a/src/Network/FedURI.hs +++ b/src/Network/FedURI.hs @@ -1,6 +1,6 @@ {- This file is part of Vervis. - - - Written 2019, 2022 by fr33domlover . + - Written 2019, 2022, 2024 by fr33domlover . - - ♡ Copying is an act of love. Please copy, reuse and share. - @@ -263,9 +263,6 @@ instance PersistField LocalSubURI where . T.stripPrefix dummyPrefix . renderSubURI . SubURI dummyAuthority - where - renderSubURI :: UriMode t => SubURI t -> Text - renderSubURI = renderFullURI . fromFullSubURI . fromSubURI fromPersistValue = bimap T.pack subUriLocal . parseSubURI' . (dummyPrefix <>) <=< fromPersistValue @@ -506,6 +503,9 @@ toSubURI (FullSubURI s a l) = flip SubURI l <$> checkAuthority s a fromSubURI :: UriMode t => SubURI t -> FullSubURI fromSubURI (SubURI a l) = FullSubURI (authorityScheme a) (toFull a) l +renderSubURI :: UriMode t => SubURI t -> Text +renderSubURI = renderFullURI . fromFullSubURI . fromSubURI + uriFromSubURI :: UriMode t => SubURI t -> URI uriFromSubURI = fromFullURI . fromFullSubURI . fromSubURI