Export renderSubURI to aid debugging
This commit is contained in:
parent
ac2ef9d1b3
commit
9096e371ce
1 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
{- This file is part of Vervis.
|
{- This file is part of Vervis.
|
||||||
-
|
-
|
||||||
- Written 2019, 2022 by fr33domlover <fr33domlover@riseup.net>.
|
- Written 2019, 2022, 2024 by fr33domlover <fr33domlover@riseup.net>.
|
||||||
-
|
-
|
||||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||||
-
|
-
|
||||||
|
@ -263,9 +263,6 @@ instance PersistField LocalSubURI where
|
||||||
. T.stripPrefix dummyPrefix
|
. T.stripPrefix dummyPrefix
|
||||||
. renderSubURI
|
. renderSubURI
|
||||||
. SubURI dummyAuthority
|
. SubURI dummyAuthority
|
||||||
where
|
|
||||||
renderSubURI :: UriMode t => SubURI t -> Text
|
|
||||||
renderSubURI = renderFullURI . fromFullSubURI . fromSubURI
|
|
||||||
fromPersistValue
|
fromPersistValue
|
||||||
= bimap T.pack subUriLocal . parseSubURI' . (dummyPrefix <>)
|
= bimap T.pack subUriLocal . parseSubURI' . (dummyPrefix <>)
|
||||||
<=< fromPersistValue
|
<=< fromPersistValue
|
||||||
|
@ -506,6 +503,9 @@ toSubURI (FullSubURI s a l) = flip SubURI l <$> checkAuthority s a
|
||||||
fromSubURI :: UriMode t => SubURI t -> FullSubURI
|
fromSubURI :: UriMode t => SubURI t -> FullSubURI
|
||||||
fromSubURI (SubURI a l) = FullSubURI (authorityScheme a) (toFull a) l
|
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 :: UriMode t => SubURI t -> URI
|
||||||
uriFromSubURI = fromFullURI . fromFullSubURI . fromSubURI
|
uriFromSubURI = fromFullURI . fromFullSubURI . fromSubURI
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue