simplify
This commit is contained in:
parent
72b54d6170
commit
7c768c0984
1 changed files with 2 additions and 4 deletions
6
Git.hs
6
Git.hs
|
@ -335,10 +335,8 @@ urlHostUser r = urlAuthPart uriUserInfo r ++ urlAuthPart uriRegName' r
|
|||
|
||||
{- The full authority portion an URL repo. (ie, "user@host:port") -}
|
||||
urlAuthority :: Repo -> String
|
||||
urlAuthority Repo { location = Url u } = uriUserInfo a ++ uriRegName' a ++ uriPort a
|
||||
where
|
||||
a = fromMaybe (error $ "bad url " ++ show u) (uriAuthority u)
|
||||
urlAuthority repo = assertUrl repo $ error "internal"
|
||||
urlAuthority r = flip urlAuthPart r $ \a ->
|
||||
uriUserInfo a ++ uriRegName' a ++ uriPort a
|
||||
|
||||
{- Applies a function to extract part of the uriAuthority of an URL repo. -}
|
||||
urlAuthPart :: (URIAuth -> a) -> Repo -> a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue