more OsPath conversion (639/749)

Sponsored-by: k0ld
This commit is contained in:
Joey Hess 2025-02-07 16:07:05 -04:00
parent a5d48edd94
commit c74c75b352
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
28 changed files with 147 additions and 132 deletions

View file

@ -7,6 +7,7 @@
-}
{-# LANGUAGE OverloadedStrings, TypeSynonymInstances #-}
{-# LANGUAGE CPP #-}
module Git.Quote (
unquote,
@ -71,6 +72,12 @@ instance Quoteable RawFilePath where
noquote = id
#ifdef WITH_OSPATH
instance Quoteable OsPath where
quote qp f = quote qp (fromOsPath f :: RawFilePath)
noquote = fromOsPath
#endif
-- Allows building up a string that contains paths, which will get quoted.
-- With OverloadedStrings, strings are passed through without quoting.
-- Eg: QuotedPath f <> ": not found"